O'Reilly logo

Python: Essential Reference, Third Edition by David Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

_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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required