scripts/uninstall.py

changeset 7210
8fe313d039e6
parent 6942
2602857055c5
child 7220
5cf645f6daab
equal deleted inserted replaced
7208:d30ac02a5f04 7210:8fe313d039e6
24 except ImportError: 24 except ImportError:
25 import sip 25 import sip
26 sip.setapi('QString', 2) 26 sip.setapi('QString', 2)
27 else: 27 else:
28 raw_input = input 28 raw_input = input
29
30 # get a local eric6config.py out of the way
31 if os.path.exists("eric6config.py"):
32 os.rename("eric6config.py", "eric6config.py.orig")
33 from eric6config import getConfig
34 29
35 # Define the globals. 30 # Define the globals.
36 progName = None 31 progName = None
37 currDir = os.getcwd() 32 currDir = os.getcwd()
38 pyModDir = None 33 pyModDir = None
72 pass 67 pass
73 68
74 os.chdir(currDir) 69 os.chdir(currDir)
75 70
76 sys.exit(rcode) 71 sys.exit(rcode)
72
73 # get a local eric6config.py out of the way
74 if os.path.exists("eric6config.py"):
75 os.rename("eric6config.py", "eric6config.py.orig")
76 try:
77 from eric6config import getConfig
78 except ImportError:
79 print("The eric6 IDE doesn't seem to be installed. Aborting.")
80 exit(1)
81 except SyntaxError:
82 # an incomplete or old config file was found
83 print("The eric6 IDE seems to be installed incompletely. Aborting.")
84 exit(1)
77 85
78 86
79 def usage(rcode=2): 87 def usage(rcode=2):
80 """ 88 """
81 Display a usage message and exit. 89 Display a usage message and exit.

eric ide

mercurial