Message322645
When using the common "#!/usr/bin/env python" shebang, recent versions of the Python launcher will search the PATH for "python" as specified in the shebang.
But Python on Windows installs as python.exe for all versions, both 2 and 3. So in a PC where Python 3 is first on PATH, this shebang will choose Python 3. That's in contrast to any other shebang like "#!python" or "#!/usr/bin/python" which will prefer Python 2.
That's rather subtle and confusing...
To the best of my knowledge most Linux distros still install Python 2 as python and Python 3 as python3 (I think that's in the Makefile too). But of course there might also be distros that install python3 as python. |
|
Date |
User |
Action |
Args |
2018-07-29 21:47:19 | Segev Finer | set | recipients:
+ Segev Finer, paul.moore, tim.golden, zach.ware, steve.dower |
2018-07-29 21:47:19 | Segev Finer | set | messageid: <1532900839.39.0.56676864532.issue34274@psf.upfronthosting.co.za> |
2018-07-29 21:47:19 | Segev Finer | link | issue34274 messages |
2018-07-29 21:47:19 | Segev Finer | create | |
|