]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/mcrypt.py
Use print function for Py3 compatibility
[m_lib.git] / m_lib / mcrypt.py
index acbead1f3f3426dcf8437597d39730977028302f..76922a0efe71b521642e84d18055cce890cd7055 100755 (executable)
@@ -5,6 +5,7 @@
 #
 
 
+from __future__ import print_function
 import random, crypt
 
 
@@ -32,7 +33,7 @@ def test():
    pwd_file = open("test.pwd", 'w')
    pwd_file.write("%s:%s" % ("user", encrypted))
    pwd_file.close()
-   print "Password file written"
+   print("Password file written")
 
    import string
    pwd_file = open("test.pwd", 'r')
@@ -40,9 +41,9 @@ def test():
    pwd_file.close()
 
    if crypt.crypt(encrypted, encrypted):
-      print "Password verified Ok"
+      print("Password verified Ok")
    else:
-      print "BAD password"
+      print("BAD password")
 
 if __name__ == "__main__":
    test()