HP Forums
HP Prime Python reference guide and tutorial? - 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: HP Prime Python reference guide and tutorial? (/thread-15507.html)



HP Prime Python reference guide and tutorial? - GadgetguyToronto - 08-27-2020 08:28 PM

Hello,

I am looking for an HP Prime Python tutorial and / or reference guide (for the python implementation incorporated in the CAS).

Would you have any pointers please?

Thank you!


RE: HP Prime Python reference guide and tutorial? - rawi - 08-28-2020 04:01 PM

Hi,

Python is not included in the HP Prime. Instead the Prime has a special programming language which is similar to Pascal. A reference for this can be found under the following link:
https://support.hp.com/us-en/product/hp-prime-graphing-calculator/5367459/model/5367460/manuals

Best

Raimund


RE: HP Prime Python reference guide and tutorial? - toml_12953 - 08-28-2020 04:06 PM

(08-28-2020 04:01 PM)rawi Wrote:  Hi,

Python is not included in the HP Prime. Instead the Prime has a special programming language which is similar to Pascal. A reference for this can be found under the following link:
https://support.hp.com/us-en/product/hp-prime-graphing-calculator/5367459/model/5367460/manuals

Best

Raimund
CAS accepts some Python commands. The entire language isn't in there but you can write some CAS programs that look a lot like Python.


RE: HP Prime Python reference guide and tutorial? - GadgetguyToronto - 08-28-2020 09:47 PM

(08-28-2020 04:06 PM)toml_12953 Wrote:  
(08-28-2020 04:01 PM)rawi Wrote:  Hi,

Python is not included in the HP Prime. Instead the Prime has a special programming language which is similar to Pascal. A reference for this can be found under the following link:
https://support.hp.com/us-en/product/hp-prime-graphing-calculator/5367459/model/5367460/manuals

Best

Raimund
CAS accepts some Python commands. The entire language isn't in there but you can write some CAS programs that look a lot like Python.

Thank you, that is exactly what I am talking about. Where is this documented? What commands can be used?


RE: HP Prime Python reference guide and tutorial? - pinkman - 08-29-2020 09:40 AM

Well Python-like syntax is understood by the CAS, probably because XCas understands it also.

But it is limited, see Parisse’s answer in this thread: https://www.hpmuseum.org/forum/thread-9481-post-83159.html#pid83159

I don’t think there is a reference guide for Python/CAS programming.
Try yourself: create a CAS program and use Python syntax, if you’re not trying to import Python modules, it will work fine.


RE: HP Prime Python reference guide and tutorial? - MikeSD - 01-04-2024 05:32 PM

(08-28-2020 04:01 PM)rawi Wrote:  Hi,

Python is not included in the HP Prime. Instead the Prime has a special programming language which is similar to Pascal. A reference for this can be found under the following link:
https://support.hp.com/us-en/product/hp-prime-graphing-calculator/5367459/model/5367460/manuals

Best

Raimund
This is not entirely true. There is an app on the latest update, that includes something like MicroPython, and does run a version.

The question is still valid, as far as I can tell. But there does't seem to be any documentation. I can't even find documentation, anywhere, that even tells how to use the Python App. HP sure has slipped with regards to providing documentation.


RE: HP Prime Python reference guide and tutorial? - StephenG1CMZ - 01-04-2024 06:36 PM

(01-04-2024 05:32 PM)MikeSD Wrote:  
(08-28-2020 04:01 PM)rawi Wrote:  Hi,

Python is not included in the HP Prime. Instead the Prime has a special programming language which is similar to Pascal. A reference for this can be found under the following link:
https://support.hp.com/us-en/product/hp-prime-graphing-calculator/5367459/model/5367460/manuals

Best

Raimund
This is not entirely true. There is an app on the latest update, that includes something like MicroPython, and does run a version.

The question is still valid, as far as I can tell. But there does't seem to be any documentation. I can't even find documentation, anywhere, that even tells how to use the Python App. HP sure has slipped with regards to providing documentation.

That app "on the latest update", is available on the actual HP Prime, but not on the latest update of the Android App.

Last year's mention of a possible update (to the 2021 Android version) have yet to happen.

There have been several tips on using Python in this forum, but little formal documentation.
The Python-in-CAS syntax may be described in XCAS documentation.