[Python-checkins] cpython: iobench.py: add more info in the header
victor.stinner
python-checkins at python.org
Sun Dec 18 21:36:57 CET 2011
http://hg.python.org/cpython/rev/03701ac95d25
changeset: 74061:03701ac95d25
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Sun Dec 18 21:38:51 2011 +0100
summary:
iobench.py: add more info in the header
Write the Python version, Unicode implementation and the platform.
files:
Tools/iobench/iobench.py | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/Tools/iobench/iobench.py b/Tools/iobench/iobench.py
--- 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 @@
"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:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list