How can I discover which version of Python I am running?
|
05-16-2023, 10:30 AM
(This post was last modified: 05-16-2023 11:07 AM by StephenG1CMZ.)
Post: #1
|
|||
|
|||
How can I discover which version of Python I am running?
So far I have this (tested only on Numworks):
Code:
With the news that Python may be coming to the HP Android, I wonder how it might best be recognised? Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
05-16-2023, 12:09 PM
Post: #2
|
|||
|
|||
RE: How can I discover which version of Python I am running?
You could try something that uses sys.platform like
Code:
|
|||
05-16-2023, 07:19 PM
Post: #3
|
|||
|
|||
RE: How can I discover which version of Python I am running?
You could also use, similar to Casio and Ti:
Code: try: Günter |
|||
05-17-2023, 07:04 AM
(This post was last modified: 05-17-2023 08:14 AM by StephenG1CMZ.)
Post: #4
|
|||
|
|||
RE: How can I discover which version of Python I am running?
Ah, so there are two alternatives.
The try import hpprime matches how the other calculators are detected. But the prime version also has sys.platform. That has the advantage that sys.platform will also show if the code is running on non-calculator hosts. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
05-21-2023, 08:48 PM
(This post was last modified: 05-21-2023 08:49 PM by StephenG1CMZ.)
Post: #5
|
|||
|
|||
RE: How can I discover which version of Python I am running?
I have placed a version here, using the built-in sys where it is available:
https://www.hpmuseum.org/forum/thread-19989.html Tested only on Numworks as Python has yet to reach HP Prime Android. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)