On 2022-05-12 17:25, Dan Stromberg wrote:
Hi folks.
I heard there's a Windows-like "py" command for Linux (and Mac?).
I'm finally getting to porting a particular project's Python 2.7 code to
3.x, and one of the first steps will probably be changing a lot of "python2
script.py" to use #!/usr/bin/env python2 and chmod +x. Then we can update
the scripts one at a time to use #!/usr/bin/env python3.
However, would this be Linux-and-Mac-only? I'm not at all sure this code
will ever move to Windows, but in case it does, would a "py" command work
on all 3 if I use #!/usr/bin/env py?
And if so, where can I find that "py" command for Linux and Mac?
I tried searching for it in Google and on Pypi, but unsurprisingly
searching for "py" gives a buzzillion hits on other things.
It's called the "Python Launcher"; you'll get more helpful results if
you search for that.
--
https://mail.python.org/mailman/listinfo/python-list