scripts/uninstall.py

changeset 7960
e8fc383322f7
parent 7923
91e843545d9a
child 8243
cc717c2ae956
equal deleted inserted replaced
7959:44e15eda6506 7960:e8fc383322f7
1 #!/usr/bin/env python3 1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*- 2 # -*- coding: utf-8 -*-
3 3
4 # Copyright (c) 2002 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> 4 # Copyright (c) 2002 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
5 # 5 #
6 # This is the uninstall script for eric6. 6 # This is the uninstall script for eric.
7 # 7 #
8 8
9 """ 9 """
10 Uninstallation script for the eric6 IDE and all eric6 related tools. 10 Uninstallation script for the eric IDE and all eric related tools.
11 """ 11 """
12 12
13 import sys 13 import sys
14 import os 14 import os
15 import shutil 15 import shutil
55 if os.path.exists("eric6config.py"): 55 if os.path.exists("eric6config.py"):
56 os.rename("eric6config.py", "eric6config.py.orig") 56 os.rename("eric6config.py", "eric6config.py.orig")
57 try: 57 try:
58 from eric6config import getConfig 58 from eric6config import getConfig
59 except ImportError: 59 except ImportError:
60 print("The eric6 IDE doesn't seem to be installed. Aborting.") 60 print("The eric IDE doesn't seem to be installed. Aborting.")
61 exit(1) 61 exit(1)
62 except SyntaxError: 62 except SyntaxError:
63 # an incomplete or old config file was found 63 # an incomplete or old config file was found
64 print("The eric6 IDE seems to be installed incompletely. Aborting.") 64 print("The eric IDE seems to be installed incompletely. Aborting.")
65 exit(1) 65 exit(1)
66 66
67 67
68 def usage(rcode=2): 68 def usage(rcode=2):
69 """ 69 """
459 459
460 for opt, _arg in optlist: 460 for opt, _arg in optlist:
461 if opt == "-h": 461 if opt == "-h":
462 usage(0) 462 usage(0)
463 463
464 print("\nUninstalling eric6 ...") 464 print("\nUninstalling eric ...")
465 uninstallEric() 465 uninstallEric()
466 print("\nUninstallation complete.") 466 print("\nUninstallation complete.")
467 print() 467 print()
468 468
469 exit(0) 469 exit(0)

eric ide

mercurial