X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Fclock%2Fmkclock.py;h=db69be6cb433346644a268df024d4a72d275a585;hb=fb3af94919a9ee18ba1c35f927f19837f057fa1f;hp=7841ec847ceac3ee64d81d21a53ed5ecd0a95463;hpb=9a523766e02fc3c5d1df4550385a604dca8e6e80;p=m_lib.git diff --git a/m_lib/clock/mkclock.py b/m_lib/clock/mkclock.py index 7841ec8..db69be6 100755 --- a/m_lib/clock/mkclock.py +++ b/m_lib/clock/mkclock.py @@ -1,20 +1,21 @@ #! /usr/bin/env python """Test if current interpreter do not have clock() and define it as need""" +from __future__ import print_function import sys, time -print "Testing...", +print("Testing...", end=' ') sys.stdout.flush() time.sleep(3) -print '\n' + " "*len("Testing...") + '\n', +print('\n' + " "*len("Testing...") + '\n', end=' ') need_clock = time.clock() <> 3 outfile = open("clock.py", 'w') if need_clock: - print "Generaing clock.py with custom clock()" + print("Generaing clock.py with custom clock()") outfile.write("""\"\"\" Define clock() for systems that do not have it \"\"\" @@ -26,7 +27,7 @@ def clock(): return int(time() - _clock) """) else: - print "Generaing clock.py with standard clock()" + print("Generaing clock.py with standard clock()") outfile.write("""\"\"\" Define clock() shim \"\"\"