Do 2.2 and 2.1.1coexist well?
Philip Swartzleonard
starx at pacbell.net
Tue Dec 4 01:51:31 EST 2001
Tim Peters || Mon 03 Dec 2001 11:32:37a:
>> ...
>> File associations is no problem - people who enjoy such things can
>> have great fun arranging trick ways to send a .py file to various
>> different python.exe's (adding various shell commands, and/or
>> associating .py with something that reads the first line of the
>> file for the name of the executable as in UNIX...)
>> ...
>> But Python itself seems to use the registry, for example it appears
>> that that's where it reads PYTHONPATH from.
>
> It's complicated. You can read the comments at the start of
> PC\getpathp.c, and I know of know way to summarize that usefully. In
> fact, Python on Windows normally never reads the registry for anything,
> not even for PYTHONPATH. You can verify that by changing the
> PYTHONPATH in your registry, and then noting that sys.path doesn't
> change as a result. The PYTHONPATH in the registry is a backup in case
> all other attempts to locate Python's home directory fail (which can
> happen if, e.g., Python components are invoked via COM by some other
> app). (OTOH, it could be the rules have changed since the ancient
> version of Python you're still torturing yourself with <wink>.)
Hm, it would probably be sufficient to make an additonal registry entry
for .py21 (or whatever) files, and have that decide it. Similar to the
.pyw association. This way, you could change the files that don't work
under the new version, and just ren *.x *.y when there is no longer a
need. It would help if there weren't many files that needed this :)
Re: Registry Pythonpath... SOMEWHERE there needs to be a giant sign that
says DO NOT BOTHER WITH THE REGISTRY PATH AS IT WILL NOT HAVE AN EFFECT
and save some of us lots of confusion :) (A faq entry 'why does changing
the registy not effect python under windows' or similar... unless i
missed one??)
--
Philip Sw "Starweaver" [rasx] :: <nothing>
More information about the Python-list
mailing list