]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/clock/mkclock.py
Replace <> with != for Py3 compatibility
[m_lib.git] / m_lib / clock / mkclock.py
index f65c7662c3aea7332aa834648ff03b3679d28f91..b2dfaad384eaccf46e05d56b0d4f688afe25a7ec 100755 (executable)
@@ -1,24 +1,21 @@
 #! /usr/bin/env python
-"""
-   Test if current interpreter do not have clock() and define it as need
-
-   Written by Broytman, Jul 1997. Copyright (C) 1997 PhiloSoft Design
-"""
+"""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
+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
 \"\"\"
@@ -30,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
 \"\"\"