Python 2.7 released

David Bolen db3l.net at gmail.com
Tue Jul 6 02:06:21 EDT 2010


Martineau <ggrp2.20.martineau at dfgh.net> writes:

> Some clarification. I meant installed 2.7 on top of 2.6.x. Doing so
> would have interfered with the currently installed version because I
> always install Python in the same directory, one named just "Python",
> to minimize the number of changes I have to make to to other parts of
> the system.

That's fine, you're just making a conscious choice to only support
(yourself) a single version installed at a time.

I tend to need multiple versions around when developing, so I keep a
bunch of versions all installed in separate directories as \Python\x.y
(so I only have a single root directory).  With 2.7, my current box
has 6 Python interpreters (2.4-3.1) installed at the moment.

I use Cygwin (wouldn't try to work on a Windows system without it), so
just use bash aliases to execute the right interpreter, but a batch
file could be used with the cmd interpreter, and you could link GUI
shortcuts to that batch file.

Not sure there's a good solution to your help file link, other than
the existing Start menu links installed per Python version.  Even with
local links you'd probably want separate links per version anyway
since they're different documents.

Of course, since this started by just considering installing it to get
at a single file (which I know was since solved), it's probably an
acceptable use case for violating your standard policy and picking a
different directory name just in this case, and then blowing it away
later. :-)

>                    I also believe the Windows installer makes registry
> changes that also involve paths to the currently installed version,
> which again, is something I wanted to avoid until I'm  actually ready
> to commit to upgrading.

The path information installed in the registry
(Software\Python\PythonCore under HLKM or HKCU depending on
installation options) is structured according to major.minor release
(e.g., 2.6 vs. 2.7 are distinct), but you're right Windows only
supports one file extension mapping, so by default the last Python to
be installed gets associated with .py/.pyw etc... by default.

But you can optionally disable this during installation.  On the
customize screen showing during installation.  de-select the "Register
Extensions" option, and the active install won't change any existing
mappings and thus have no impact on your current default installation.

> If there are better ways on Windows to accomplish this, I'd like to
> hear about them. I suppose I could use hardlinks or junctions but
> they're not well supported on most versions of Windows.

If you're still using the basic Windows command prompt or GUI links
then a batch file is the simplest way to go.  With something like
Cygwin (which I personally would never do without), then you have a
variety of techniques available including links, shell aliases, etc...

-- David



More information about the Python-list mailing list