Use print() function in both Python 2 and Python 3

Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3.
This commit is contained in:
cclauss
2019-06-24 18:49:38 +02:00
parent b71ed3887e
commit 5bb6b58bc1
25 changed files with 353 additions and 328 deletions

View File

@@ -45,6 +45,7 @@
#
from __future__ import with_statement
from __future__ import print_function
__version__ = '1.01'
@@ -199,7 +200,7 @@ def encryption(infile):
def main():
argv=unicode_argv()
print encryption(argv[1])
print(encryption(argv[1]))
return 0
if __name__ == "__main__":