[Python-ideas] Rename python.exe to python3.exe on Windows

Nick Coghlan ncoghlan at gmail.com
Mon May 9 18:55:32 CEST 2011


On Tue, May 10, 2011 at 2:43 AM, Mathias Panzenböck
<grosser.meister.morti at gmx.net> wrote:
> Now on Windows there is no #! mechanism. I think it would be worthwhile to
> fix this and implement a python-dispatcher for Windows. This would then
> parse the #!-line, drop the "/usr/bin/env" part (if it exists) and lookup
> the right Python binary form a registry variable. I don't know if there are
> any registry variables set in a Windows Python installation that let you
> find the binary of a certain version, but I think it would be a good thing.
>
> This way correct scripts would just work under Unix (Linux, Mac, BSD) and
> Windows. And under Windows you would not have any problems with file type
> associations. *.py and *.pyw files just have to be associated with the
> dispatcher. It should not matter if the dispatcher is from a Python 2.x or
> Python 3.x installation.

Since this came up not all that long ago, I'll point people to PEP 394
(for the current draft recommendation regarding symlinks on *nix
systems) and PEP 397 (for proposed Windows launcher semantics).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list