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) |