394 def removeConfigurationData(): |
394 def removeConfigurationData(): |
395 """ |
395 """ |
396 Remove the eric configuration directory. |
396 Remove the eric configuration directory. |
397 """ |
397 """ |
398 try: |
398 try: |
399 from PyQt6.QtCore import QSettings # __IGNORE_WARNING_I10__ |
399 from PyQt6.QtCore import QSettings # __IGNORE_WARNING_I-10__ |
400 except ImportError: |
400 except ImportError: |
401 print("No PyQt variant installed. The configuration directory") |
401 print("No PyQt variant installed. The configuration directory") |
402 print("cannot be determined. You have to remove it manually.\n") |
402 print("cannot be determined. You have to remove it manually.\n") |
403 return |
403 return |
404 |
404 |
441 @type str |
441 @type str |
442 @return value of requested registry variable |
442 @return value of requested registry variable |
443 @rtype Any |
443 @rtype Any |
444 """ |
444 """ |
445 # From http://stackoverflow.com/a/35286642 |
445 # From http://stackoverflow.com/a/35286642 |
446 import winreg # __IGNORE_WARNING_I103__ |
446 import winreg # __IGNORE_WARNING_I-103__ |
447 |
447 |
448 try: |
448 try: |
449 registryKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, path, 0, winreg.KEY_READ) |
449 registryKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, path, 0, winreg.KEY_READ) |
450 value, _ = winreg.QueryValueEx(registryKey, name) |
450 value, _ = winreg.QueryValueEx(registryKey, name) |
451 winreg.CloseKey(registryKey) |
451 winreg.CloseKey(registryKey) |