Post Reply 
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:

"""XMH Explore My Host.
This version identifies which calculator you are on.
"""

crme="""
© 2023 StephenG1CMZ
"""
crid="XMH\nExplore My Host"+crme

try:
  import casioplot
  isCasio=True
except:
  isCasio=False

try:
  import ion
  isNumworks=True
except:
  isNumworks=False

if isNumworks:
  try:
    import os
    fork="Omega" #alternative
  except:
    fork="Epsilon" #Main

try:
  import ti_system
  isTI=True
except:
  IsTI=False


print(crid)
if isCasio:
  print("Casio")

if isNumworks:
  print("Numworks", fork)
  if fork=="Omega":
    print(os.name)

if isTI:
  print("TI")

if isCasio or isNumworks or isTI:
  isCalculator=True
else:
  isCalculator=False
  print("Unrecognised Host")

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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
How can I discover which version of Python I am running? - StephenG1CMZ - 05-16-2023 10:30 AM



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