Coexistence (was: Python 2.0b1 is released!)

Tim Peters tim_one at email.msn.com
Sun Sep 10 17:34:51 EDT 2000


[posted & mailed]

[Piet van Oostrum]
> Does anyone know if Python 2.0b1 can peacefully coexist with python 1.5.2
> on a Windows machine? (E.g. are there no common registry entries)

Alas, that isn't wholly possible, although the installer tries to overwrite
as little as it can.  For example, when you double-click on a xxx.py file in
Explorer, Windows looks in the registry to see what that *means*.  The
action it picks is based *solely* on the string ".py", so it's impossible to
tell Windows that *some* .py files you want opened with 1.6 but others with
2.0b1.  Ditto for .pyw, .pyo and .pyc files, and the

HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe

entry (which, e.g., tells Windows where to find Python if you type merely
"python" in the Start -> Run box).

That's about it, though.  After you install 2.0b1, look in the install.log
in the root of your 2.0 installation.  It's a plain text file.  Changes to
the registry are recorded in lines beginning with "RegDB ".  Cases where it
overwrote something show both the new and old values, like so:

RegDB Key: Python.CompiledFile\shell\open\command
RegDB Val: C:\Python20\python.exe "%1" %*
RegDB Old: C:\Python16\python.exe "%1" %*
RegDB Key: Python.CompiledFile\DefaultIcon
RegDB Val: C:\Python20\pyc.ico
RegDB Old: C:\Python16\pyc.ico

If you can't live with this, you need a different OS, or need to argue that
Python shouldn't *try* to provide native app behavior on Windows <wink>.

Note that Python installation leaves your PATH entirely alone, so people
complaining about that not getting updated are forgetting that they changed
it themselves.






More information about the Python-list mailing list