Post Reply 
Python: Is it possible to create/import/export .py files into the calculator
10-27-2021, 12:45 AM (This post was last modified: 10-27-2021 12:47 AM by toml_12953.)
Post: #2
RE: Python: Is it possible to create/import/export .py files into the calculator
(10-26-2021 11:49 PM)marethyu Wrote:  title.

Yes. What I do is to connect the calculator via USB, open the Connectivity Kit (CK), Start a new program in the kit (right click on the word program on the left side and click new) An entry box will appear on the right with a Main tab. Copy and paste the Python code from your text editor into the Main box on the right.. Insert the following line before the first line of your program:
Code:
#PYTHON name

Now, after the last line of your code add this:

Code:
#end
EXPORT pyhat()
BEGIN
  PYTHON(name);
END;
but change "pyhat" to the name of your program.

Click the double floppy icon at the top of the CK to save the program to the physical calculator.
Now you can run the Python program the same way as you run any other Prime program.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Python: Is it possible to create/import/export .py files into the calculator - toml_12953 - 10-27-2021 12:45 AM



User(s) browsing this thread: 1 Guest(s)