Commit e74624d0 authored by Kirill Smelkov's avatar Kirill Smelkov

X -> py3 compatible print

parent 99c75057
......@@ -32,6 +32,8 @@ Version History:
"""
from __future__ import print_function
LOOPS = 50000
from time import clock
......@@ -59,9 +61,9 @@ FALSE = 0
def main(loops=LOOPS):
benchtime, stones = pystones(loops)
print "Pystone(%s) time for %d passes = %g" % \
(__version__, loops, benchtime)
print "This machine benchmarks at %g pystones/second" % stones
print("Pystone(%s) time for %d passes = %g" % \
(__version__, loops, benchtime))
print("This machine benchmarks at %g pystones/second" % stones)
def pystones(loops=LOOPS):
......@@ -255,8 +257,8 @@ def Func3(EnumParIn):
if __name__ == '__main__':
import sys
def error(msg):
print >>sys.stderr, msg,
print >>sys.stderr, "usage: %s [number_of_loops]" % sys.argv[0]
print(msg, file=sys.stderr)
print("usage: %s [number_of_loops]" % sys.argv[0], file=sys.stderr)
sys.exit(100)
nargs = len(sys.argv) - 1
if nargs > 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment