def RecurseKeys ( self ) : yield self for subkey in self . GetSubkeys ( ) : for key in subkey . RecurseKeys ( ) : yield key
python winreg looping through subkeys
Recurses the subkeys starting with the key .
def RecurseKeys(self):
    """Recurses the subkeys starting with the key.

    Yields:
      WinRegistryKey: Windows Registry key.
    """
    yield self
    for subkey in self.GetSubkeys():
      for key in subkey.RecurseKeys():
        yield key