_winreg
The _winreg module provides a low-level interface to the Windows registry. The registry is a large hierarchical tree in which each node is called a key. The children of a particular key are known as subkeys and may contain additional subkeys or values. For example, the setting of the Python sys.path variable is typically contained in the registry as follows:
\HKEY_LOCAL_MACHINE\Software\Python\PythonCore\2.0\PythonPath
In this case, Software is a subkey of HKEY_LOCAL_MACHINE, Python is a subkey of Software, and so forth. The value of the PythonPath key contains the actual path setting.
Keys are accessed through open and close operations. Open keys are represented by special handles (which are wrappers around the integer handle identifiers ...
Get Python: Essential Reference, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.