pybuild.winreg module

Helper functions for interacting with the Windows registry

Also provides the following constants from the winreg builtin module:

HKEY_CLASSES_ROOT: int
HKEY_CURRENT_CONFIG: int
HKEY_CURRENT_USER: int
HKEY_LOCAL_MACHINE: int
HKEY_USERS: int
pybuild.winreg.read_reg(key, subkey, entry=None)[source]

Reads the given registry key/subkey

Parameters
  • key (str) – Registry key to read from

  • subkey (str) – Registry subkey to read from

  • entry (Optional[str]) – Optional name in the dictionary stored at the given key/subkey to use.

Return type

Union[Any, Dict[str, Any]]

Returns

Key data, type is usually a string. If the key contains subkeys and the entry is not provided, returns a dictionary mapping subkey names to their values