uninstall.py

changeset 3019
7912530a33e2
parent 2992
dbdf27746da5
child 3039
8dd0165d805d
child 3058
0a02c433f52d
equal deleted inserted replaced
3018:70924c0bdaf1 3019:7912530a33e2
27 27
28 28
29 def exit(rcode=0): 29 def exit(rcode=0):
30 """ 30 """
31 Exit the uninstall script. 31 Exit the uninstall script.
32
33 @param rcode result code to report back (integer)
32 """ 34 """
33 # restore the local eric5config.py 35 # restore the local eric5config.py
34 if os.path.exists("eric5config.py.orig"): 36 if os.path.exists("eric5config.py.orig"):
35 if os.path.exists("eric5config.py"): 37 if os.path.exists("eric5config.py"):
36 os.remove("eric5config.py") 38 os.remove("eric5config.py")
39 41
40 def usage(rcode=2): 42 def usage(rcode=2):
41 """ 43 """
42 Display a usage message and exit. 44 Display a usage message and exit.
43 45
44 rcode is the return code passed back to the calling process. 46 @param rcode return code passed back to the calling process (integer)
45 """ 47 """
46 global progName 48 global progName
47 49
48 print("Usage:") 50 print("Usage:")
49 print(" {0} [-h]".format(progName)) 51 print(" {0} [-h]".format(progName))
63 65
64 66
65 def wrapperName(dname, wfile): 67 def wrapperName(dname, wfile):
66 """ 68 """
67 Create the platform specific name for the wrapper script. 69 Create the platform specific name for the wrapper script.
70
71 @param dname name of the directory to place the wrapper into
72 @param wfile basename (without extension) of the wrapper script
73 @return the name of the wrapper script
68 """ 74 """
69 if sys.platform.startswith("win"): 75 if sys.platform.startswith("win"):
70 wname = dname + "\\" + wfile + ".bat" 76 wname = dname + "\\" + wfile + ".bat"
71 else: 77 else:
72 wname = dname + "/" + wfile 78 wname = dname + "/" + wfile
164 170
165 def main(argv): 171 def main(argv):
166 """ 172 """
167 The main function of the script. 173 The main function of the script.
168 174
169 argv is the list of command line arguments. 175 @param argv list of command line arguments
170 """ 176 """
171 import getopt 177 import getopt
172 178
173 initGlobals() 179 initGlobals()
174 180

eric ide

mercurial