summaryrefslogtreecommitdiffstats
path: root/Tools/pybench
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/pybench')
-rw-r--r--Tools/pybench/Setup.py4
-rwxr-xr-xTools/pybench/pybench.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/Tools/pybench/Setup.py b/Tools/pybench/Setup.py
index f1417e6..21e654a 100644
--- a/Tools/pybench/Setup.py
+++ b/Tools/pybench/Setup.py
@@ -30,6 +30,10 @@ from Lists import *
from Tuples import *
from Dict import *
from Exceptions import *
+try:
+ from With import *
+except SyntaxError:
+ pass
from Imports import *
from Strings import *
from Numbers import *
diff --git a/Tools/pybench/pybench.py b/Tools/pybench/pybench.py
index dd398f5..624347f 100755
--- a/Tools/pybench/pybench.py
+++ b/Tools/pybench/pybench.py
@@ -121,7 +121,8 @@ def get_machine_details():
'platform': platform.platform(),
'processor': platform.processor(),
'executable': sys.executable,
- 'implementation': platform.python_implementation(),
+ 'implementation': getattr(platform, 'python_implementation',
+ lambda:'n/a')(),
'python': platform.python_version(),
'compiler': platform.python_compiler(),
'buildno': buildno,
@@ -833,7 +834,7 @@ python pybench.py -s p25.pybench -c p21.pybench
print('PYBENCH %s' % __version__)
print('-' * LINE)
print('* using %s %s' % (
- platform.python_implementation(),
+ getattr(platform, 'python_implementation', lambda:'Python')(),
' '.join(sys.version.split())))
# Switch off garbage collection