patch_modpython.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 2992
dbdf27746da5
child 3060
5883ce99ee12
--- a/patch_modpython.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/patch_modpython.py	Fri Oct 18 23:00:41 2013 +0200
@@ -25,7 +25,7 @@
     """
     Display a usage message and exit.
 
-    rcode is the return code passed back to the calling process.
+    @param rcode return code passed back to the calling process (integer)
     """
     global progName, modDir
     
@@ -33,10 +33,11 @@
     print("    {0} [-h] [-d dir]".format(progName))
     print("where:")
     print("    -h             display this help message")
-    print("    -d dir         where Mod_python files are installed [default {0}]".format(
-        modDir))
+    print("    -d dir         where Mod_python files are installed"
+          " [default {0}]".format(modDir))
     print()
-    print("This script patches the file apache.py of the Mod_python distribution")
+    print("This script patches the file apache.py of the Mod_python"
+          " distribution")
     print("so that it will work with the eric5 debugger instead of pdb.")
     print("Please see mod_python.html for more details.")
     print()
@@ -46,17 +47,20 @@
 
 def initGlobals():
     """
-    Sets the values of globals that need more than a simple assignment.
+    Module function to set the values of globals that need more than a
+    simple assignment.
     """
     global modDir
 
-    modDir = os.path.join(distutils.sysconfig.get_python_lib(True), "mod_python")
+    modDir = os.path.join(distutils.sysconfig.get_python_lib(True),
+                          "mod_python")
 
 
 def main(argv):
-    """The main function of the script.
+    """
+    The main function of the script.
 
-    argv is the list of command line arguments.
+    @param argv list of command line arguments (list of strings)
     """
     import getopt
 
@@ -106,7 +110,8 @@
         s.write("\n")
         s.write('def initDebugger(name):\n')
         s.write('    """\n')
-        s.write('    Initialize the debugger and set the script name to be reported \n')
+        s.write('    Initialize the debugger and set the script name to be'
+                ' reported \n')
         s.write('    by the debugger. This is a patch for eric5.\n')
         s.write('    """\n')
         s.write('    if not pdb.initDebugger("standard"):\n')
@@ -154,7 +159,8 @@
     except SystemExit:
         raise
     except:
-        print("""An internal error occured.  Please report all the output of the program,
+        print(
+"""An internal error occured.  Please report all the output of the program,
 including the following traceback, to eric-bugs@die-offenbachs.de.
 """)
         raise

eric ide

mercurial