X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Fopstring.py;h=8bd864acb0f3de2c07bf5b3047854c16cfb66b8e;hb=fb3af94919a9ee18ba1c35f927f19837f057fa1f;hp=92d193bb63539d255de0a4e9a389195a686b3f30;hpb=d7c459a9f979c4978cf07ff11056512a852fd61d;p=m_lib.git diff --git a/m_lib/opstring.py b/m_lib/opstring.py index 92d193b..8bd864a 100755 --- a/m_lib/opstring.py +++ b/m_lib/opstring.py @@ -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()