"#!/usr/bin/env python" vs. "#!/usr/bin/python"?

Matej Cepl mcepl at redhat.com
Sun Sep 30 17:46:27 EDT 2012


On 28/09/12 12:57, Roy Smith wrote:
> But, you might as well get into the habit of 
> using the /usr/bin/env flavor because it's more flexible.

In the same manner as one's freedom-fighter is another's fundamentalist
terrorist, what's flexible could be also dangerous. E.g.,

#!/usr/bin/env python

is forbidden in the core Fedora packages
(https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython),
because nobody is willing to risk that by some random python binary in
/usr/local/bin some core infrastructure of Fedora installations (e.g.,
yum) could be broken.

Matěj




More information about the Python-list mailing list