Eryk Sun <eryk...@gmail.com> added the comment:
If .py files are associated with py.exe, handling the shebang "#!/usr/bin/env python[3]" might spawn the python[3].exe launcher recursively if it handles shebangs (see bpo-40687). To avoid this, process() can set a flag based on the image name that prevents calling maybe_handle_shebang(). I still think it would be for the best if the python3.exe launcher ran as "py -3", and the python.exe launcher ran as "py", based simply on checking the image name. Also, I think these two launchers should drop all command-line option support, i.e. -h, --help, --list, --list-paths, -0[p], and -X[.Y][-32|-64]. This keeps the command-line interface for the "python" command consistent across the board. PY_PYTHON3 would set the default for the "python3.exe" launcher, and PY_PYTHON would set the default for the "python.exe" launcher. For whatever reason, PY_PYTHON could be set to 2 to make the python.exe launcher run 2.x. (Even in Ubuntu I install the python-is-python3 package, but sadly some people are stuck maintaining 2.x code.) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40667> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com