Removed some unused main script code. 6_1_x

Sun, 15 Nov 2015 14:30:12 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 15 Nov 2015 14:30:12 +0100
branch
6_1_x
changeset 4567
ac444d1c9700
parent 4565
8f9faf21abcc
child 4570
00aefa1e9c5f

Removed some unused main script code.

Globals/compatibility_fixes.py file | annotate | diff | comparison | revisions
Utilities/ModuleParser.py file | annotate | diff | comparison | revisions
Utilities/PasswordChecker.py file | annotate | diff | comparison | revisions
Utilities/crypto/__init__.py file | annotate | diff | comparison | revisions
Utilities/crypto/py3PBKDF2.py file | annotate | diff | comparison | revisions
eric6_iconeditor.py file | annotate | diff | comparison | revisions
--- 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
 

eric ide

mercurial