[Python-Dev] Python launcher command line usage (Was: 3.2.1 encoding surprise)
p.f.moore at gmail.com
Tue Jul 19 18:21:30 CEST 2011
On 19 July 2011 16:16, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Tue, 19 Jul 2011 16:00:57 +0100
> Paul Moore <p.f.moore at gmail.com> wrote:
>> On 19 July 2011 02:41, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
>> > The use of py from the command line is merely a convenience for developers (as
>> > the PEP says) - it's better to rely on shebang lines together with settings in
>> > the .ini to get the behaviour you want.
>> But it's a *huge* convenience for running multiple Python versions,
>> particularly as no existing Python versions install executables with
>> the version in the name (python3.exe, python3.2.exe, etc).
> Perhaps this could be changed? As far as I can see, python.exe is
> a small executable around ~25KB (all the code being in the DLL), so
> there doesn't seem to be any harm to make a copy of it named either
> pythonXY.exe or pythonX.Y.exe.
I'm sure it could (and in fact, I thought that this had been discussed
some time back and it may even be already happening in 3.3) but it
doesn't help for existing versions, where the py.exe launcher does. So
as a longer-term solution, supplying pythonXY.exe binaries may be
useful (depending on how PEP 397 progresses), but the benefits won't
be for quite some time. (And there's still the question of what gets
put on PATH by default even if version-specific binaries exist).
It's a topic worthy of discussion, but I suspect that in actual fact,
PEP 397 may offer a more complete solution to the various Windows
1. What level of support is there for PEP 397? If it's unlikely to get
accepted, there's little point in basing a solution on it.
2. Would it be worth extending the goals of the PEP to make
simplifying command line usage an explicit goal? Or is it better to
keep PEP 397 focused on one thing and have a separate PEP covering
such further extensions to the PEP 397 launcher?
More information about the Python-Dev