MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / _split_path

Method _split_path

pydevd_attach_to_process/winappdbg/registry.py:433–458  ·  view source on GitHub ↗

Splits a Registry path and returns the hive and key. @type path: str @param path: Registry path. @rtype: tuple( int, str ) @return: Tuple containing the hive handle and the subkey path. The hive handle is always one of the following integer co

(self, path)

Source from the content-addressed store, hash-verified

431 return self._machine
432
433 def _split_path(self, path):
434 """
435 Splits a Registry path and returns the hive and key.
436
437 @type path: str
438 @param path: Registry path.
439
440 @rtype: tuple( int, str )
441 @return: Tuple containing the hive handle and the subkey path.
442 The hive handle is always one of the following integer constants:
443 - L{win32.HKEY_CLASSES_ROOT}
444 - L{win32.HKEY_CURRENT_USER}
445 - L{win32.HKEY_LOCAL_MACHINE}
446 - L{win32.HKEY_USERS}
447 - L{win32.HKEY_PERFORMANCE_DATA}
448 - L{win32.HKEY_CURRENT_CONFIG}
449 """
450 if "\\" in path:
451 p = path.find("\\")
452 hive = path[:p]
453 path = path[p + 1 :]
454 else:
455 hive = path
456 path = None
457 handle = self._hives_by_name[hive.upper()]
458 return handle, path
459
460 def _parse_path(self, path):
461 """

Callers 2

_parse_pathMethod · 0.95
_sanitize_pathMethod · 0.95

Calls 1

findMethod · 0.45

Tested by

no test coverage detected