Adding Python Information to the Windows Registry

February 19, 2003 | Fredrik Lundh

Some Python distributions add information to the Windows registry
when installed. This information is used by certain tools, such as
the win32all installer and Windows installers generated by the
distutils (dead link) package.

If you’re using an unregistered Python environment, you’ll usually
end up with an empty list of alternatives on the installer’s
“Select Python installation to use” screen.

The following script registers the current interpreter. The
script should work for Python 2.0 and later.

Note that there can be only one registered interpreter for each
major Python release (e.g. 2.0, 2.1, 2,2 etc).