[Python-Dev] PEP 379 Python launcher for Windows - behaviour for #!/usr/bin/env python line is wrong

Nick Coghlan ncoghlan at gmail.com
Sat May 4 07:50:09 CEST 2013


On Sat, May 4, 2013 at 12:18 PM, Brian Curtin <brian at python.org> wrote:
> On Fri, May 3, 2013 at 3:23 PM, Paul Moore <p.f.moore at gmail.com> wrote:
>> I would propose that the behaviour of the launcher on Windows should be
>> changed when it encounters specifically the hashbang line #!/usr/bin/env
>> python. In that case, it should search PATH for a copy of python.exe, and if
>> it finds one, use that. If there is no python.exe on PATH, it should fall
>> back to the same version of Python as would have been used if the line were
>> #!/usr/bin/python.
>>
>> This will mean that scripts written with #!/usr/bin/env python will behave
>> the same on Unix and Windows in the presence of activated virtualenvs.
>>
>> Would people be happy with this change? If so I will open an issue on
>> bugs.python.org. I can look at producing a patch, as well.
>
> Sounds reasonable to me.

Also to me.

Cheers,
Nick.

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


More information about the Python-Dev mailing list