29 |
29 |
30 print("Usage:") |
30 print("Usage:") |
31 print(" {0} [-h] [-d dir]".format(progName)) |
31 print(" {0} [-h] [-d dir]".format(progName)) |
32 print("where:") |
32 print("where:") |
33 print(" -h display this help message") |
33 print(" -h display this help message") |
34 print(" -d dir where Mod_python files are installed [default {0}]".format( |
34 print(" -d dir where Mod_python files are installed" |
35 modDir)) |
35 " [default {0}]".format(modDir)) |
36 print() |
36 print() |
37 print("This script patches the file apache.py of the Mod_python distribution") |
37 print("This script patches the file apache.py of the Mod_python" |
|
38 " distribution") |
38 print("so that it will work with the eric5 debugger instead of pdb.") |
39 print("so that it will work with the eric5 debugger instead of pdb.") |
39 print("Please see mod_python.html for more details.") |
40 print("Please see mod_python.html for more details.") |
40 print() |
41 print() |
41 |
42 |
42 sys.exit(rcode) |
43 sys.exit(rcode) |
104 |
106 |
105 if not ericFound: |
107 if not ericFound: |
106 s.write("\n") |
108 s.write("\n") |
107 s.write('def initDebugger(name):\n') |
109 s.write('def initDebugger(name):\n') |
108 s.write(' """\n') |
110 s.write(' """\n') |
109 s.write(' Initialize the debugger and set the script name to be reported \n') |
111 s.write(' Initialize the debugger and set the script name to be' |
|
112 ' reported \n') |
110 s.write(' by the debugger. This is a patch for eric5.\n') |
113 s.write(' by the debugger. This is a patch for eric5.\n') |
111 s.write(' """\n') |
114 s.write(' """\n') |
112 s.write(' if not pdb.initDebugger("standard"):\n') |
115 s.write(' if not pdb.initDebugger("standard"):\n') |
113 s.write(' raise ImportError("Could not initialize debugger")\n') |
116 s.write(' raise ImportError("Could not initialize debugger")\n') |
114 s.write(' pdb.setScriptname(name)\n') |
117 s.write(' pdb.setScriptname(name)\n') |