New submission from Brendan Barnwell:

With the fix of issue #17903 in place, the behavior of the Windows launcher for 
a shebang of "#!/usr/bin/env python" is now different from the behavior for the 
other "virtual commands" in that the PATH is searched for this particular 
virtual command but not the others.  But this difference is not explained in 
the docs (see https://docs.python.org/3/using/windows.html#shebang-lines).  The 
docs should be updated to make the difference clear.

In addition, as noted in bug #24625, the launcher parses and executes shebang 
lines "normally" if the shebang is not one of the virtual commands.  However, 
this is not actually stated on the documentation page; the only examples on the 
page either use the virtual commands or use a bare command like "python".  
Given that shebang lines don't normally work at all on Windows, and given that 
the shebang handling is already different on Windows because of the virtual 
commands, the docs shouldn't assume that it's clear what "works like a normal 
shebang" means.  A note should be added to the docs to make this explicit.  
Something like "If the shebang line is not one of these virtual commands, it is 
executed as a normal program and the script filename is passed to it as a 
command-line argument."

----------
components: Windows
messages: 248796
nosy: BrenBarn, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows launcher docs don't fully explain shebang semantics
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24890>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to