1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
# this module is populated at initialization from the c++ part of PythonUI
"""Runtime variables, populated at yade startup."""
# default value
hasDisplay = False
# find out about which ipython version we use -- 0.10* and 0.11 are supported, but they have different internals
import IPython
try: # attempt to get numerical version
ipython_version = int(IPython.__version__.split('.')[0]) * 100 + int(IPython.__version__.split('.')[1])
except ValueError:
print('WARN: unable to extract IPython version from %s, defaulting to 10' % (IPython.__version__))
ipython_version = 10
if (ipython_version < 10): #set version 10 for very old systems
newipver = 10
ipython_version = newipver
|