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:
@@ -8,6 +8,7 @@
|
||||
# pbkdf2.py Copyright © 2009 Daniel Holth <dholth@fastmail.fm>
|
||||
# pbkdf2.py This code may be freely used and modified for any purpose.
|
||||
|
||||
from __future__ import print_function
|
||||
import sys, os
|
||||
import hmac
|
||||
from struct import pack
|
||||
@@ -158,7 +159,7 @@ def _load_libalfcrypto():
|
||||
topazCryptoDecrypt(ctx, data, out, len(data))
|
||||
return out.raw
|
||||
|
||||
print u"Using Library AlfCrypto DLL/DYLIB/SO"
|
||||
print(u"Using Library AlfCrypto DLL/DYLIB/SO")
|
||||
return (AES_CBC, Pukall_Cipher, Topaz_Cipher)
|
||||
|
||||
|
||||
@@ -244,7 +245,7 @@ def _load_python_alfcrypto():
|
||||
cleartext = self.aes.decrypt(iv + data)
|
||||
return cleartext
|
||||
|
||||
print u"Using Library AlfCrypto Python"
|
||||
print(u"Using Library AlfCrypto Python")
|
||||
return (AES_CBC, Pukall_Cipher, Topaz_Cipher)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user