]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/opstring.py
Use print function for Py3 compatibility
[m_lib.git] / m_lib / opstring.py
index 92d193bb63539d255de0a4e9a389195a686b3f30..8bd864acb0f3de2c07bf5b3047854c16cfb66b8e 100755 (executable)
@@ -5,10 +5,9 @@
 # opString - string/pathnames manipulation routines
 # Some ideas came from Turbo Professional/Object Professional (t/o)pString.PAS
 #
-# Written by Broytman, Nov 1997. Copyright (C) 1997 PhiloSoft Design
-#
 
 
+from __future__ import print_function
 from string import *
 
 
@@ -145,14 +144,14 @@ def koi2win(s, errors = "strict"):
 #
 
 def test():
-   print "bin(0x6) =", bin(0x6)
-   print "bin(0xC) =", bin(0xC)
+   print("bin(0x6) =", bin(0x6))
+   print("bin(0xC) =", bin(0xC))
 
-   print "'Test' left-padded :", LeftPad("Test", 20)
-   print "'Test' right-padded:", PadCh("Test", '*', 20)
-   print "'Test' centered    :", CenterCh("Test", '=', 20)
+   print("'Test' left-padded :", LeftPad("Test", 20))
+   print("'Test' right-padded:", PadCh("Test", '*', 20))
+   print("'Test' centered    :", CenterCh("Test", '=', 20))
 
-   print "'Олег':", koi2win(win2koi("Олег"))
+   print("'Олег':", koi2win(win2koi("Олег")))
 
 if __name__ == "__main__":
    test()