def _RegistryGetValue(key, value):
 try:
  return _RegistryGetValueUsingWinReg(key, value)
 except ImportError:
  pass
 text = _RegistryQuery(key, value)
 if (not text):
  return None
 match = re.search('REG_\\w+\\s+([^\\r]+)\\r\\n', text)
 if (not match):
  return None
 return match.group(1)

def _RegistryGetValue ( key , value ) : try : return _RegistryGetValueUsingWinReg ( key , value ) except ImportError : pass text = _RegistryQuery ( key , value ) if ( not text ) : return None match = re . search ( 'REG_\\w+\\s+([^\\r]+)\\r\\n' , text ) if ( not match ) : return None return match . group ( 1 )
use _winreg or reg .