new user python on hp prime g2, casio cg50
|
05-29-2021, 08:09 AM
(This post was last modified: 05-29-2021 08:24 AM by drbarnack.)
Post: #14
|
|||
|
|||
RE: new user python on hp prime g2, casio cg50
(05-26-2021 06:28 AM)drbarnack Wrote: Following on this, is there a way to return the output from a Python script embedded in a PPL program to the stack? I figured this out. The trick is to evaluate the output from the Terminal: Code:
This takes a value from the stack ("sys.argv[0]"), does the calculation in Python, prints the answer to the Terminal, parses the first string in the Terminal into an expression and evaluates it, leaving the answer on the stack for future use ("RETURN EXPR(TERMINAL(1));"). So in Home or CAS mode I can use Python scripts like any other function in the Toolbox to manipulate values. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)