scripts/uninstall.py

changeset 7628
f904d0eef264
parent 7360
9190402e4505
child 7836
2f0d208b8137
equal deleted inserted replaced
7626:7f643d41464e 7628:f904d0eef264
41 os.remove("eric6config.py") 41 os.remove("eric6config.py")
42 os.rename("eric6config.py.orig", "eric6config.py") 42 os.rename("eric6config.py.orig", "eric6config.py")
43 43
44 if sys.platform.startswith(("win", "cygwin")): 44 if sys.platform.startswith(("win", "cygwin")):
45 try: 45 try:
46 input("Press enter to continue...") 46 input("Press enter to continue...") # secok
47 except (EOFError, SyntaxError): 47 except (EOFError, SyntaxError):
48 pass 48 pass
49 49
50 os.chdir(currDir) 50 os.chdir(currDir)
51 51
327 for path in pathsToRemove: 327 for path in pathsToRemove:
328 print(" - {0}".format(path)) 328 print(" - {0}".format(path))
329 answer = "c" 329 answer = "c"
330 while answer not in ["y", "Y", "n", "N", ""]: 330 while answer not in ["y", "Y", "n", "N", ""]:
331 answer = input("Shall these directories be removed (y/N)? ") 331 answer = input("Shall these directories be removed (y/N)? ")
332 # secok
332 if answer in ["y", "Y"]: 333 if answer in ["y", "Y"]:
333 for path in pathsToRemove: 334 for path in pathsToRemove:
334 shutil.rmtree(path) 335 shutil.rmtree(path)
335 336
336 337
343 print("Found the eric data directory") 344 print("Found the eric data directory")
344 print(" - {0}".format(cfg)) 345 print(" - {0}".format(cfg))
345 answer = "c" 346 answer = "c"
346 while answer not in ["y", "Y", "n", "N", ""]: 347 while answer not in ["y", "Y", "n", "N", ""]:
347 answer = input("Shall this directory be removed (y/N)? ") 348 answer = input("Shall this directory be removed (y/N)? ")
349 # secok
348 if answer in ["y", "Y"]: 350 if answer in ["y", "Y"]:
349 shutil.rmtree(cfg) 351 shutil.rmtree(cfg)
350 352
351 353
352 def removeConfigurationData(): 354 def removeConfigurationData():
367 print("Found the eric configuration directory") 369 print("Found the eric configuration directory")
368 print(" - {0}".format(settingsDir)) 370 print(" - {0}".format(settingsDir))
369 answer = "c" 371 answer = "c"
370 while answer not in ["y", "Y", "n", "N", ""]: 372 while answer not in ["y", "Y", "n", "N", ""]:
371 answer = input("Shall this directory be removed (y/N)? ") 373 answer = input("Shall this directory be removed (y/N)? ")
374 # secok
372 if answer in ["y", "Y"]: 375 if answer in ["y", "Y"]:
373 shutil.rmtree(settingsDir) 376 shutil.rmtree(settingsDir)
374 377
375 378
376 def getConfigDir(): 379 def getConfigDir():
417 linkTemplates = [ 420 linkTemplates = [
418 "eric6 (Python {0}.{1}).lnk", 421 "eric6 (Python {0}.{1}).lnk",
419 "eric6 Browser (Python {0}.{1}).lnk", 422 "eric6 Browser (Python {0}.{1}).lnk",
420 ] 423 ]
421 424
422 return [l.format(majorVersion, minorVersion) for l in linkTemplates] 425 return [ll.format(majorVersion, minorVersion) for ll in linkTemplates]
423 426
424 427
425 def windowsProgramsEntry(): 428 def windowsProgramsEntry():
426 """ 429 """
427 Function to generate the name of the Start Menu top entry. 430 Function to generate the name of the Start Menu top entry.

eric ide

mercurial