patch_modpython.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1509
c0b5e693b0eb
--- a/patch_modpython.py	Fri Mar 11 08:55:14 2011 +0100
+++ b/patch_modpython.py	Fri Mar 11 16:51:57 2011 +0100
@@ -2,7 +2,7 @@
 
 # Copyright (c) 2003-2011 Detlev Offenbach <detlev@die-offenbachs.de>
 #
-# This is a  script to patch mod_python for eric5. 
+# This is a  script to patch mod_python for eric5.
 
 """
 Script to patch mod_python for usage with the eric5 IDE.
@@ -18,7 +18,8 @@
 progName = None
 modDir = None
 
-def usage(rcode = 2):
+
+def usage(rcode=2):
     """
     Display a usage message and exit.
 
@@ -49,6 +50,7 @@
 
     modDir = os.path.join(distutils.sysconfig.get_python_lib(True), "mod_python")
 
+
 def main(argv):
     """The main function of the script.
 
@@ -63,7 +65,7 @@
     initGlobals()
 
     try:
-        optlist, args = getopt.getopt(argv[1:],"hd:")
+        optlist, args = getopt.getopt(argv[1:], "hd:")
     except getopt.GetoptError:
         usage()
 
@@ -76,7 +78,7 @@
     
     try:
         filename = os.path.join(modDir, "apache.py")
-        f = open(filename, "r", encoding = "utf-8")
+        f = open(filename, "r", encoding="utf-8")
     except EnvironmentError:
         print("The file {0} does not exist. Aborting.".format(filename))
         sys.exit(1)
@@ -88,7 +90,7 @@
     ericFound = False
     
     sn = "apache.py"
-    s = open(sn, "w", encoding = "utf-8")
+    s = open(sn, "w", encoding="utf-8")
     for line in lines:
         if not pdbFound and line.startswith("import pdb"):
             s.write("import eric5.DebugClients.Python.eric5dbgstub as pdb\n")

eric ide

mercurial