DebugClients/Python/coverage/env.py

changeset 6219
d6c795b5ce33
parent 5178
878ce843ca9f
child 6649
f1b3a73831c9
equal deleted inserted replaced
6218:bedab77d0fa3 6219:d6c795b5ce33
2 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt 2 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
3 3
4 """Determine facts about the environment.""" 4 """Determine facts about the environment."""
5 5
6 import os 6 import os
7 import platform
7 import sys 8 import sys
8 9
9 # Operating systems. 10 # Operating systems.
10 WINDOWS = sys.platform == "win32" 11 WINDOWS = sys.platform == "win32"
11 LINUX = sys.platform == "linux2" 12 LINUX = sys.platform == "linux2"
12 13
13 # Python implementations. 14 # Python implementations.
14 PYPY = '__pypy__' in sys.builtin_module_names 15 PYPY = (platform.python_implementation() == 'PyPy')
16 if PYPY:
17 PYPYVERSION = sys.pypy_version_info
18
19 JYTHON = (platform.python_implementation() == 'Jython')
20 IRONPYTHON = (platform.python_implementation() == 'IronPython')
15 21
16 # Python versions. 22 # Python versions.
17 PYVERSION = sys.version_info 23 PYVERSION = sys.version_info
18 PY2 = PYVERSION < (3, 0) 24 PY2 = PYVERSION < (3, 0)
19 PY3 = PYVERSION >= (3, 0) 25 PY3 = PYVERSION >= (3, 0)

eric ide

mercurial