X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Fopstring.py;h=8bd864acb0f3de2c07bf5b3047854c16cfb66b8e;hb=fb3af94919a9ee18ba1c35f927f19837f057fa1f;hp=e01a043786186c3b0ea9c9fcf033871be5b6a679;hpb=9a523766e02fc3c5d1df4550385a604dca8e6e80;p=m_lib.git diff --git a/m_lib/opstring.py b/m_lib/opstring.py index e01a043..8bd864a 100755 --- a/m_lib/opstring.py +++ b/m_lib/opstring.py @@ -7,6 +7,7 @@ # +from __future__ import print_function from string import * @@ -143,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()