Message198875
The current version of py.exe *does* do a PATH search for a shebang of "#!/usr/bin/env python" (see #17903).
The whole *point* of py.exe is to invoke Pythons which are *not* available on the PATH.
The behaviour of py.exe is as documented in PEP 397, other than the PATH-searching for /usr/bin/env python which is a more recent addition.
People are supposed to put shebang lines in their scripts, else PEP 397 is not of much use to them. Scripts installed via setuptools/pip (e.g. into a virtualenv) have correct shebang lines prepended to them.
Note that the environment variables and some py.ini settings are *alternative* ways of specifying intent. The choosing of 2.x vs. 3.x is also mentioned in the PEP and was suggested as the best default for the largest user population - that of 2.x users potentially transitioning to 3.x.
Is there some deviation from PEP 397 (other than /usr/bin/env python -> PATH search) that you are trying to draw attention to? Or is purely a documentation fix sufficient? Otherwise, I will be closing this as wontfix, as the basic behaviour was thrashed out when PEP 397 was discussed. |
|
Date |
User |
Action |
Args |
2013-10-02 21:57:27 | vinay.sajip | set | recipients:
+ vinay.sajip, mhammond, gwideman |
2013-10-02 21:57:27 | vinay.sajip | set | messageid: <1380751047.78.0.91199157067.issue19141@psf.upfronthosting.co.za> |
2013-10-02 21:57:27 | vinay.sajip | link | issue19141 messages |
2013-10-02 21:57:27 | vinay.sajip | create | |
|