def _iter_keys ( key ) : for i in range ( winreg . QueryInfoKey ( key ) [ 0 ] ) : yield winreg . OpenKey ( key , winreg . EnumKey ( key , i ) )
read all subkeys from a key regedit python
! Iterate over subkeys of a key
def _iter_keys(key):
    """! Iterate over subkeys of a key
    """
    for i in range(winreg.QueryInfoKey(key)[0]):
        yield winreg.OpenKey(key, winreg.EnumKey(key, i))