uninstall.py

changeset 1343
5487f13ffae5
parent 1161
ddab52aa1a6b
child 1346
8c9af7608afa
equal deleted inserted replaced
1342:30226d5a7ffb 1343:5487f13ffae5
18 from eric5config import getConfig 18 from eric5config import getConfig
19 19
20 # Define the globals. 20 # Define the globals.
21 progName = None 21 progName = None
22 pyModDir = None 22 pyModDir = None
23 progLanguages = ["Python", "Ruby"]
23 24
24 25
25 def usage(rcode=2): 26 def usage(rcode=2):
26 """Display a usage message and exit. 27 """Display a usage message and exit.
27 28
121 if os.path.exists(name): 122 if os.path.exists(name):
122 os.remove(name) 123 os.remove(name)
123 124
124 # Cleanup API files 125 # Cleanup API files
125 apidir = getConfig('apidir') 126 apidir = getConfig('apidir')
126 for name in getConfig('apis'): 127 for progLanguage in progLanguages:
127 apiname = os.path.join(apidir, name) 128 for name in getConfig('apis'):
128 if os.path.exists(apiname): 129 apiname = os.path.join(apidir, progLanguage.lower(), name)
130 if os.path.exists(apiname):
131 os.remove(apiname)
132 for apiName in glob.glob(os.path.join(apidir, progLanguage.lower(), "*.bas")):
129 os.remove(apiname) 133 os.remove(apiname)
130 134
131 135
132 def main(argv): 136 def main(argv):
133 """The main function of the script. 137 """The main function of the script.

eric ide

mercurial