The registry is a central point of storage for all manner of configuration information on a Windows machine. It consists of three broad areas: system-level information, user-level information and on-the-fly information. Areas of the registry can be controlled using standard Windows security functionality and the user section of the registry is copied about when roaming profiles are enabled. It’s possible (and sometimes desirable) to connect to the registry on a remote computer.
Access to the registry is possible under Python by a number of different routes. A non-exhaustive list includes: WMI, the _winreg module in the stdlib, the Reg... functions in the pywin32 modules, and the ctypes module. (You could also get fancy with various command line tools, Shell functions or the Windows Scripting Host). Which approach you should use will depend on a couple of factors: is the particular API call you need actually available; and are you already using one or other toolset in your application?
Note that, although this section is devoted to the various underlying API calls available by different routes, there are already several registry-wrapper modules available for Python. Why reinvent the wheel unless you have some wholly new requirement? And even then, why not contribute back to an existing project? Some of the available modules are listed below under References.
See also