def _win32_getvalue(key, name, default=''):
 try:
  from win32api import RegQueryValueEx
 except ImportError:
  import _winreg
  RegQueryValueEx = _winreg.QueryValueEx
 try:
  return RegQueryValueEx(key, name)
 except:
  return default

def _win32_getvalue ( key , name , default = '' ) : try : from win32api import RegQueryValueEx except ImportError : import _winreg RegQueryValueEx = _winreg . QueryValueEx try : return RegQueryValueEx ( key , name ) except : return default
read a value for name from the registry key .