[Python-Dev] [PEPs] Support the /usr/bin/python2 symlink upstream
Mark Hammond
skippy.hammond at gmail.com
Mon Mar 7 02:18:00 CET 2011
On 7/03/2011 1:55 AM, Paul Moore wrote:
> On 6 March 2011 02:33, Mark Hammond<skippy.hammond at gmail.com> wrote:
>> IIUC, the PEP language is referring to links which point to a specific
>> version of Python and that there is no suggestion a 'python3' will live in
>> the Python 3 binary tree. If that is correct and assuming we don't want to
>> investigate using links on Windows, I'd suggest the best analogy to the *nix
>> situation could be simply for the installers to generate "python2.bat" and
>> "python3.bat" files and put them in System32 with a "last installed wins"
>> policy.
>
> No, no, no! Please no! Bat files are a lousy way of writing wrappers
> on Windows, as they don't nest. I've lost count of the number of times
> I've been tripped up by putting a series of commands into a batch
> file, only to have them fail because somewhere in the middle is a bat
> file wrapper which makes the "outer" bat file stop part way through
> :-(
To be clear, I was suggesting that using .bat files in system32 is a
close analogy to the *nix situation - I didn't mean to advocate for it
to actually happen :) Further, I see the creation of a python3.exe in
the Python install directory as quite different than the *nix situation
(where the 'python3' link is not in the install dir, but instead in a
'system' dir). IOW, I was trying to point out the solution to the
problem on *nix doesn't translate that well to Windows, so Windows
should not be considered as part of this PEP. That isn't to suggest
Windows should not be considered at all.
That said though, I'm only -0 on python2.exe/python3.exe - I don't think
it will hurt, but also don't think it will help that much in practice.
It may also turn out to be unnecessary should a "complete" solution be
implemented - eg, a "python launcher" which (a) read the shebang lines
and (b) allowed something like "python -3" on the command-line would
render both python3.exe and requests to have multiple installed Python
versions on the PATH redundant.
Cheers,
Mark
More information about the Python-Dev
mailing list