Multiple Versions of Python on Windows XP

Glenn Linderman v+python at g.nevcal.com
Thu Dec 4 02:34:28 EST 2008


On approximately 12/3/2008 8:51 AM, came the following characters from 
the keyboard of Colin J. Williams:
> Martin v. Löwis wrote:
>>>>> What changes are made to the registry?
>>>> For a complete list, see Tools/msi/msi.py in the source tree.
>>> I have scanned the file:
>>> http://svn.python.org/projects/python/branches/py3k/Tools/msi/msi.py
>>>
>>> I don't find anything that addresses this issue.
>>
>> Read the add_registry function. You may need to first understand
>> how the Registry table in an MSI file works.
>>
>>> I am seeking some mechanism such that any of Python 2.5, Python 2.6 or
>>> Python 2.6 can be chosen as the currently active version.
>>
>> If Glenn Lindermann's answer doesn't help, you need to explain:
>> what is a "currently active version"? How is one Python version
>> more active than any other?
>>
>>> I was hoping that there is some simpler way than the "Repair" 
>>> procedure.
>>
>> See Glenn Lindermann's answer.
>>
>>>> It would be good to be more specific with such statements: what 
>>>> troubles
>>>> specifically? If I play dumb, I'd say "of course - windows explorer
>>>> doesn't support editing Python files; you need a text editor".
>>> Yes, I should have been clearer.  The PyScripter application locks up
>>> and must be killed, using the Task Manager.
>>
>> I think you need to report that to the PyScripter authors as a bug.
>> I can't imagine how the "currently active version" can affect what
>> PyScripter does.
>>
>> Regards,
>> Martin
>
> Martin,
>
> Many thanks for your responses.  Yes,
> Glen Lindermann's suggestion seems to
> meet the need.
>
> It's been a while since I've looked at
> DOS and I didn't remember fType or assoc.

The equivalent of those commands is available via Windows Explorer, 
Tools / Folder Options, File Types, scroll-scroll-scroll your way to 
.py, Click Advanced, fiddle, copy paste apply, and other twaddle.  A 
perfect example of why not everything should be done via GUI interfaces, 
or at least why this is an extremely poor GUI interface.

GUI designers should count the command line keystrokes, and make sure 
their interface is shorter, otherwise they are a failure.

> Michel Claveau suggests VirtualBox, this
> seems a big hammer to kill
> this particular fly.
>
> It's interesting that each install sets
> up a Python.File variable in the registry.
>
> It's a pity that this can't be used to achieve this more simply.

Martin seems willing to entertain the idea of future Windows installers 
doing something more brilliant in this area, for those that wish to 
switch between multiple installed versions, as he asked for a tracking 
issue to be created, which I did.

Whether it will be exactly my technique, or something further improved, 
time will tell.  But that will only apply to versions released after 3.0 
and 2.6.1 (unless he has already coded it into the release, but I doubt 
he had time, or wishes to destabilize or delay these releases).

Anyway, if you remember the arcane techniques for copy/paste in CMD 
prompt windows (Alt-space or click the "system" icon in the upper left 
of the CMD prompt window), and go from there, then setting up the 
multiple ftypes becomes a bit easier, perhaps.

> Best wishes,
>
> Colin W. 



-- 
Glenn -- http://nevcal.com/
===========================
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking




More information about the Python-list mailing list