Post Reply 
How can I discover which version of Python I am running?
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:

try:
    import sys

    try:
        if sys.platform == "HP Prime":
            IsPrime = True
        else:
            IsPrime = False
    except AttributeError:
        IsPrime = False

except ImportError:
    IsPrime = False

print("IsPrime:", IsPrime)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How can I discover which version of Python I am running? - drbarnack - 05-16-2023 12:09 PM



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