diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-12-18 20:38:51 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-12-18 20:38:51 (GMT) |
commit | 8f23be7189833ac0852cb5b0375241fbf7c48094 (patch) | |
tree | 86ff54543130fc1e000a5e82453f426623fdd6c5 /Tools/iobench | |
parent | 357347627186a037805b12ff1740d36d0f8e2e11 (diff) | |
download | cpython-8f23be7189833ac0852cb5b0375241fbf7c48094.zip cpython-8f23be7189833ac0852cb5b0375241fbf7c48094.tar.gz cpython-8f23be7189833ac0852cb5b0375241fbf7c48094.tar.bz2 |
iobench.py: add more info in the header
Write the Python version, Unicode implementation and the platform.
Diffstat (limited to 'Tools/iobench')
-rw-r--r-- | Tools/iobench/iobench.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Tools/iobench/iobench.py b/Tools/iobench/iobench.py index 5ec6f17..408be7b 100644 --- a/Tools/iobench/iobench.py +++ b/Tools/iobench/iobench.py @@ -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: |