scripts/uninstall.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9448
ea215f7afab3
child 9549
67295777d9fe
child 9653
e67609152c5e
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
9 """ 9 """
10 Uninstallation script for the eric IDE and all eric related tools. 10 Uninstallation script for the eric IDE and all eric related tools.
11 """ 11 """
12 12
13 import contextlib 13 import contextlib
14 import getopt
14 import glob 15 import glob
15 import os 16 import os
16 import shutil 17 import shutil
17 import sys 18 import sys
18 import sysconfig 19 import sysconfig
384 def removeConfigurationData(): 385 def removeConfigurationData():
385 """ 386 """
386 Remove the eric configuration directory. 387 Remove the eric configuration directory.
387 """ 388 """
388 try: 389 try:
389 from PyQt6.QtCore import QSettings 390 from PyQt6.QtCore import QSettings # __IGNORE_WARNING_I10__
390 except ImportError: 391 except ImportError:
391 print("No PyQt variant installed. The configuration directory") 392 print("No PyQt variant installed. The configuration directory")
392 print("cannot be determined. You have to remove it manually.\n") 393 print("cannot be determined. You have to remove it manually.\n")
393 return 394 return
394 395
430 @type str 431 @type str
431 @return value of requested registry variable 432 @return value of requested registry variable
432 @rtype any 433 @rtype any
433 """ 434 """
434 # From http://stackoverflow.com/a/35286642 435 # From http://stackoverflow.com/a/35286642
435 import winreg 436 import winreg # __IGNORE_WARNING_I103__
436 437
437 try: 438 try:
438 registryKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, path, 0, winreg.KEY_READ) 439 registryKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, path, 0, winreg.KEY_READ)
439 value, _ = winreg.QueryValueEx(registryKey, name) 440 value, _ = winreg.QueryValueEx(registryKey, name)
440 winreg.CloseKey(registryKey) 441 winreg.CloseKey(registryKey)
476 """ 477 """
477 The main function of the script. 478 The main function of the script.
478 479
479 @param argv list of command line arguments 480 @param argv list of command line arguments
480 """ 481 """
481 import getopt
482
483 initGlobals() 482 initGlobals()
484 483
485 # Parse the command line. 484 # Parse the command line.
486 global progName 485 global progName
487 progName = os.path.basename(argv[0]) 486 progName = os.path.basename(argv[0])

eric ide

mercurial