def read_keys(base, key):
 try:
  handle = RegOpenKeyEx(base, key)
 except RegError:
  return None
 L = []
 i = 0
 while 1:
  try:
   k = RegEnumKey(handle, i)
  except RegError:
   break
  L.append(k)
  i = (i + 1)
 return L

def read_keys ( base , key ) : try : handle = RegOpenKeyEx ( base , key ) except RegError : return None L = [ ] i = 0 while 1 : try : k = RegEnumKey ( handle , i ) except RegError : break L . append ( k ) i = ( i + 1 ) return L
return list of registry keys .