10419:2fda68a9168d | 10420:5ac83a87954d |
---|---|
32 | 32 |
33 def exit(rcode=0): | 33 def exit(rcode=0): |
34 """ | 34 """ |
35 Exit the uninstall script. | 35 Exit the uninstall script. |
36 | 36 |
37 @param rcode result code to report back (integer) | 37 @param rcode result code to report back |
38 @type int | |
38 """ | 39 """ |
39 global currDir | 40 global currDir |
40 | 41 |
41 # restore the local eric7config.py | 42 # restore the local eric7config.py |
42 if os.path.exists("eric7config.py.orig"): | 43 if os.path.exists("eric7config.py.orig"): |
88 def wrapperNames(dname, wfile): | 89 def wrapperNames(dname, wfile): |
89 """ | 90 """ |
90 Create the platform specific names for the wrapper script. | 91 Create the platform specific names for the wrapper script. |
91 | 92 |
92 @param dname name of the directory to place the wrapper into | 93 @param dname name of the directory to place the wrapper into |
94 @type str | |
93 @param wfile basename (without extension) of the wrapper script | 95 @param wfile basename (without extension) of the wrapper script |
94 @return the names of the wrapper scripts | 96 @type str |
97 @return list of names of the wrapper scripts | |
98 @rtype list of str | |
95 """ | 99 """ |
96 wnames = ( | 100 wnames = ( |
97 (dname + "\\" + wfile + ".cmd", dname + "\\" + wfile + ".bat") | 101 [dname + "\\" + wfile + ".cmd", dname + "\\" + wfile + ".bat"] |
98 if sys.platform.startswith(("win", "cygwin")) | 102 if sys.platform.startswith(("win", "cygwin")) |
99 else (dname + "/" + wfile,) | 103 else [dname + "/" + wfile] |
100 ) | 104 ) |
101 | 105 |
102 return wnames | 106 return wnames |
103 | 107 |
104 | 108 |
409 | 413 |
410 def getConfigDir(): | 414 def getConfigDir(): |
411 """ | 415 """ |
412 Module function to get the name of the directory storing the config data. | 416 Module function to get the name of the directory storing the config data. |
413 | 417 |
414 @return directory name of the config dir (string) | 418 @return directory name of the config dir |
419 @rtype str | |
415 """ | 420 """ |
416 cdn = ".eric7" | 421 cdn = ".eric7" |
417 return os.path.join(os.path.expanduser("~"), cdn) | 422 return os.path.join(os.path.expanduser("~"), cdn) |
418 | 423 |
419 | 424 |