Closed DannyCork closed 2 months ago
Hey @DannyCork - appreciate you taking the time to create a PR. Man, I had to read up on this one! I've been putting that she-bang line in scripts for years, but forgot why.
Did some research, and it's what PEP 394 recommends for virtual environments (which I've always used and probably why I gravitated toward it) - https://peps.python.org/pep-0394/#for-python-script-publishers
In general, Python stuff should be run in a virtual environment or in a container these days. I have been meaning to push a Dockerfile
to the repo with a Python3 base image. In addition, with Python2 EOL as well (and hopefully the elimination of python vs python3 stuff alias shenanigans)...I don't see a strong need to specify the version in that line.
I will chew on this one a bit more and do some more reading.
Other links:
Appreciate the thought provoking PR @DannyCork, but after reviewing the "For Python script publishers" recommendations in https://peps.python.org/pep-0394/#recommendation again, I'm going to leave it as is. I do recommend using a virtual environment, running it in a container is possible (I plan to provide a Dockerfile soon), and in due time I think python
will just come to mean python3
and a specific numerical distinction won't be necessary.
Applications designed exclusively for a specific environment (such as a container or virtual environment) may continue to use the python command name.
updated to python3
as per readme "Scripts are written for Python 3.6+"