HP Forums
how to use HP PRIME commands in a python program - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: how to use HP PRIME commands in a python program (/thread-16876.html)



how to use HP PRIME commands in a python program - robmio - 05-04-2021 04:24 PM

Hello,
How can I use HP PRIME commands in a python program? How do I use, for example, the PIXON_P command in a python program?
Thanks a lot, Roberto.


RE: how to use HP PRIME commands in a python program - toml_12953 - 05-04-2021 07:11 PM

(05-04-2021 04:24 PM)robmio Wrote:  Hello,
How can I use HP PRIME commands in a python program? How do I use, for example, the PIXON_P command in a python program?
Thanks a lot, Roberto.

eval("PIXON_P ...")

replace ... with your parameters.
You don't need to use the HPPL version, though. Python has the graphics commands natively.

Just use
Code:
from hpprime import *

then use pixon or pixon_c in your program. It's a lot faster to do it that way.


RE: how to use HP PRIME commands in a python program - robmio - 05-05-2021 05:00 AM

Thanks a lot, Roberto


RE: how to use HP PRIME commands in a python program - robmio - 05-05-2021 05:49 AM

I ask another neophyte question: after writing a program with PYTHON, how can I call it up and make it work, in HOME or CAS screen?