]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
iobench.py: add more info in the header
authorVictor Stinner <victor.stinner@haypocalc.com>
Sun, 18 Dec 2011 20:38:51 +0000 (21:38 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sun, 18 Dec 2011 20:38:51 +0000 (21:38 +0100)
Write the Python version, Unicode implementation and the platform.

Tools/iobench/iobench.py

index 5ec6f179de73184bc81218c60a1e70e8aa46b1be..408be7b63783a839d1ac62e7d5302f473da432c7 100644 (file)
@@ -1,13 +1,14 @@
 # -*- coding: utf-8 -*-
 # This file should be kept compatible with both Python 2.6 and Python >= 3.0.
 
-import time
+import functools
+import hashlib
+import itertools
 import os
+import platform
 import re
 import sys
-import hashlib
-import functools
-import itertools
+import time
 from optparse import OptionParser
 
 out = sys.stdout
@@ -307,6 +308,16 @@ def run_all_tests(options):
         "large": 2,
     }
 
+    print("Python %s" % sys.version)
+    if sys.version_info < (3, 3):
+        if sys.maxunicode > 0xffff:
+            text = "UCS-4 (wide build)"
+        else:
+            text = "UTF-16 (narrow build)"
+    else:
+        text = "PEP 393"
+    print("Unicode: %s" % text)
+    print(platform.platform())
     binary_files = list(get_binary_files())
     text_files = list(get_text_files())
     if "b" in options: