Sun, 15 Nov 2015 14:30:12 +0100
Removed some unused main script code.
--- a/Globals/compatibility_fixes.py Sun Nov 15 13:59:43 2015 +0100 +++ b/Globals/compatibility_fixes.py Sun Nov 15 14:30:12 2015 +0100 @@ -284,15 +284,6 @@ # Inject into the __builtin__ dictionary __builtin__.open = open -if __name__ == '__main__': - fp = open('compatibility_fixes.py', encoding='latin1') - print(fp.read()) - fp.close() - - with open('compatibility_fixes.py', encoding='UTF-8') as fp: - rlines = fp.readlines() - print(rlines[-1]) - # # eflag: FileType = Python2 # eflag: noqa = M702
--- a/Utilities/ModuleParser.py Sun Nov 15 13:59:43 2015 +0100 +++ b/Utilities/ModuleParser.py Sun Nov 15 14:30:12 2015 +0100 @@ -1635,13 +1635,3 @@ if modname in _modules: del _modules[modname] - -if __name__ == "__main__": - # Main program for testing. - mod = sys.argv[1] - module = readModule(mod) - for cls in list(module.classes.values()): - print("--------------") - print(cls.name) - for meth in list(cls.methods.values()): - print(meth.name, meth.pyqtSignature)
--- a/Utilities/PasswordChecker.py Sun Nov 15 13:59:43 2015 +0100 +++ b/Utilities/PasswordChecker.py Sun Nov 15 14:30:12 2015 +0100 @@ -635,11 +635,3 @@ break return self.complexity["value"] - -if __name__ == "__main__": - while True: - try: - pwd = input("Enter password: ") - print(pwd, PasswordChecker().checkPassword(pwd)) - except KeyboardInterrupt: - break
--- a/Utilities/crypto/__init__.py Sun Nov 15 13:59:43 2015 +0100 +++ b/Utilities/crypto/__init__.py Sun Nov 15 14:30:12 2015 +0100 @@ -314,24 +314,3 @@ except ValueError: return "", False return plaintext, True - -if __name__ == "__main__": - import sys - from PyQt5.QtWidgets import QApplication - - app = QApplication([]) - - mpw = "blahblah" - cpw = "SomeSecret" - - cipher, ok = pwEncrypt(cpw) - print(ok, cipher) - plain, ok = pwDecrypt(cipher) - print(ok, plain) - - cipher, ok = pwEncrypt(cpw, mpw) - print(ok, cipher) - plain, ok = pwDecrypt(cipher, mpw) - print(ok, plain) - - sys.exit(0)
--- a/Utilities/crypto/py3PBKDF2.py Sun Nov 15 13:59:43 2015 +0100 +++ b/Utilities/crypto/py3PBKDF2.py Sun Nov 15 14:30:12 2015 +0100 @@ -141,13 +141,3 @@ salt = base64.b64decode(salt.encode("ascii")) password = password.encode("utf-8") return pbkdf2(password, salt, iterations, Hashes[digestname]) - - -if __name__ == "__main__": - import sys - pw = "secret_password" - print(len(hashPasswordTuple(pw)[-1])) - pwHash = hashPassword(pw) - print(pwHash) - print(verifyPassword(pw, pwHash)) - sys.exit(0)
--- a/eric6_iconeditor.py Sun Nov 15 13:59:43 2015 +0100 +++ b/eric6_iconeditor.py Sun Nov 15 14:30:12 2015 +0100 @@ -24,7 +24,6 @@ import sys import os -print(sys.argv) for arg in sys.argv[:]: if arg.startswith("--config="): import Globals @@ -39,7 +38,6 @@ QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, settingsDir) sys.argv.remove(arg) -print(sys.argv) from Globals import AppInfo