patch_modpython.py

changeset 2965
d133c7edd88a
parent 2302
f29e9405c851
child 2992
dbdf27746da5
equal deleted inserted replaced
2964:84b65fb9e780 2965:d133c7edd88a
21 21
22 def usage(rcode=2): 22 def usage(rcode=2):
23 """ 23 """
24 Display a usage message and exit. 24 Display a usage message and exit.
25 25
26 rcode is the return code passed back to the calling process. 26 @param rcode return code passed back to the calling process (integer)
27 """ 27 """
28 global progName, modDir 28 global progName, modDir
29 29
30 print("Usage:") 30 print("Usage:")
31 print(" {0} [-h] [-d dir]".format(progName)) 31 print(" {0} [-h] [-d dir]".format(progName))
42 sys.exit(rcode) 42 sys.exit(rcode)
43 43
44 44
45 def initGlobals(): 45 def initGlobals():
46 """ 46 """
47 Sets the values of globals that need more than a simple assignment. 47 Module function to set the values of globals that need more than a
48 simple assignment.
48 """ 49 """
49 global modDir 50 global modDir
50 51
51 modDir = os.path.join(distutils.sysconfig.get_python_lib(True), "mod_python") 52 modDir = os.path.join(distutils.sysconfig.get_python_lib(True), "mod_python")
52 53
53 54
54 def main(argv): 55 def main(argv):
55 """The main function of the script. 56 """
57 The main function of the script.
56 58
57 argv is the list of command line arguments. 59 @param argv list of command line arguments (list of strings)
58 """ 60 """
59 import getopt 61 import getopt
60 62
61 # Parse the command line. 63 # Parse the command line.
62 global progName, modDir 64 global progName, modDir

eric ide

mercurial