def list_keys(hive, key=None, use_32bit_registry=False):
 if PY2:
  local_hive = _mbcs_to_unicode(hive)
  local_key = _unicode_to_mbcs(key)
 else:
  local_hive = hive
  local_key = key
 registry = Registry()
 hkey = registry.hkeys[local_hive]
 access_mask = registry.registry_32[use_32bit_registry]
 subkeys = []
 try:
  handle = _winreg.OpenKey(hkey, local_key, 0, access_mask)
  for i in range(_winreg.QueryInfoKey(handle)[0]):
   subkey = _winreg.EnumKey(handle, i)
   if PY2:
    subkeys.append(_mbcs_to_unicode(subkey))
   else:
    subkeys.append(subkey)
  handle.Close()
 except WindowsError as exc:
  log.debug(exc)
  log.debug(u'Cannot find key: {0}\\{1}'.format(hive, key))
  return (False, u'Cannot find key: {0}\\{1}'.format(hive, key))
 return subkeys

def list_keys ( hive , key = None , use_32bit_registry = False ) : if PY2 : local_hive = _mbcs_to_unicode ( hive ) local_key = _unicode_to_mbcs ( key ) else : local_hive = hive local_key = key registry = Registry ( ) hkey = registry . hkeys [ local_hive ] access_mask = registry . registry_32 [ use_32bit_registry ] subkeys = [ ] try : handle = _winreg . OpenKey ( hkey , local_key , 0 , access_mask ) for i in range ( _winreg . QueryInfoKey ( handle ) [ 0 ] ) : subkey = _winreg . EnumKey ( handle , i ) if PY2 : subkeys . append ( _mbcs_to_unicode ( subkey ) ) else : subkeys . append ( subkey ) handle . Close ( ) except WindowsError as exc : log . debug ( exc ) log . debug ( u'Cannot find key: {0}\\{1}' . format ( hive , key ) ) return ( False , u'Cannot find key: {0}\\{1}' . format ( hive , key ) ) return subkeys
list the keys available .