Recurses the subkeys starting with the key.

    Yields:
      WinRegistryKey: Windows Registry key.
763479
def RecurseKeys(self):
    
    yield self
    for subkey in self.GetSubkeys():
      for key in subkey.RecurseKeys():
        yield key
1013758
def key_by(self, key_selector):
        
        op = Operator(
            _generate_uuid(),
            OpType.KeyBy,
            "KeyBy",
            other=key_selector,
            num_instances=self.env.config.parallelism)
        return self.__register(op)
926395
def AddSubkey(self, registry_key):
    
    name = registry_key.name.upper()
    if name in self._subkeys:
      raise KeyError(
          'Subkey: {0:s} already exists.'.format(registry_key.name))

    self._subkeys[name] = registry_key

    key_path = key_paths.JoinKeyPath([self._key_path, registry_key.name])
    registry_key._key_path = key_path
965311
def _prune(current, keys):
    
    pruned_current = {k: current[k] for k in keys if k in current}
    pruned_children = list(
        filter(
            None, [_prune(c, keys) for c in current.get("IORegistryEntryChildren", [])]
        )
    )
    keep_current = any(k in current for k in keys) or pruned_children
    if keep_current:
        if pruned_children:
            pruned_current["IORegistryEntryChildren"] = pruned_children
        return pruned_current
    else:
        return {}
995444
def iterkeys(self):
        """"""
        def _iterkeys(bin):
            for item in bin:
                yield item.key

        for bin in self.bins:
            yield _iterkeys(bin)
212249
def reset_registries(dicts: Tuple[Dict, Mapping, Mapping]):
    
    dict_ = globals()
    dict_['_id2devices'] = dicts[0]
    dict_['_registry'] = dicts[1]
    dict_['_selection'] = dicts[2]
40860
def subkeys(self, path):
        
        for _ in subpaths_for_path_range(path, hardening_chars="'pH"):
            yield self.subkey_for_path(_)
867801
def Match(self, registry_key):
    
    key_path = registry_key.path.upper()
    if self._key_path_prefix and self._key_path_suffix:
      if (key_path.startswith(self._key_path_prefix) and
          key_path.endswith(self._key_path_suffix)):

        key_path_segment = key_path[
            len(self._key_path_prefix):-len(self._key_path_suffix)]
        if key_path_segment.startswith('ControlSet'.upper()):
          try:
            control_set = int(key_path_segment[10:], 10)
          except ValueError:
            control_set = None

          # TODO: check if control_set is in bounds.
          return control_set is not None

    return key_path in (self._key_path_upper, self._wow64_key_path_upper)
1089036
def _batch_key(self, query):
    '''
    
    '''
    return ''.join( ['%s%s'%(k,v) for k,v in sorted(query.items())] )
23205
def _iter_keys(key):
    
    for i in range(winreg.QueryInfoKey(key)[0]):
        yield winreg.OpenKey(key, winreg.EnumKey(key, i))
201445
def number_of_subkeys(self):
    """"""
    if not self._registry_key and self._registry:
      self._GetKeyFromRegistry()

    return len(self._subkeys)
686765
def iterchildren(self):
        
        handle = self.handle
        index = 0
        while 1:
            subkey = win32.RegEnumKey(handle, index)
            if subkey is None:
                break
            yield self.child(subkey)
            index += 1
243045
@Override
    public Iterator<String> registeredKeys() {
        Iterator<HandlerPath> paths = handlerKeys.iterator();
        List<String> registeredKeys = new ArrayList<String>(handlerKeys.size());
        while (paths.hasNext()) {
            HandlerPath path = paths.next();
            if (!path.isHidden()) {
                registeredKeys.add(path.getRegisteredPath());
            }
        }

        return registeredKeys.iterator();
    }
897544
def _get_from_registry(self):
        
        from ._windows import reg_keys
        for location in reg_keys:
            location = location.replace('\\', '/')
            jreKey = "/proc/registry/HKEY_LOCAL_MACHINE/{}".format(location)
            try:
                with open(jreKey + "/CurrentVersion") as f:
                    cv = f.read().split('\x00')
                versionKey = jreKey + "/" + cv[0]

                with open(versionKey + "/RunTimeLib") as f:
                    cv = f.read().split('\x00')

                return cv[0]

            except OSError:
                pass
        return None
874966
def GetSubkeyByPath(self, key_path):
    
    if not self._registry_key and self._registry:
      self._GetKeyFromRegistry()

    subkey = self
    for path_segment in key_paths.SplitKeyPath(key_path):
      subkey = subkey.GetSubkeyByName(path_segment)
      if not subkey:
        break

    return subkey
556695
def counter(self, key, **dims):
        """"""
        return super(RegexRegistry, self).counter(self._get_key(key), **dims)
651461
def __get_registry_key(self, key):
        
        import winreg

        root = winreg.OpenKey(
            winreg.HKEY_CURRENT_USER, r'SOFTWARE\GSettings\org\gnucash\general', 0, winreg.KEY_READ)
        [pathname, regtype] = (winreg.QueryValueEx(root, key))
        winreg.CloseKey(root)
        return pathname