"#!/usr/bin/env python" vs. "#!/usr/bin/python"?
Demian Brecht
demianbrecht at gmail.com
Fri Sep 28 09:58:43 EDT 2012
On 12-09-28 06:19 AM, D'Arcy Cain wrote:
> Not just flexible but portable. On various systems I have Python
> in /usr/bin, /usr/local/bin and /usr/pkg/bin. "#!/usr/bin/env python"
> finds it in each case so I only need one version of the script.
>
+1. This also resolves correctly on Cygwin, even if Python is installed
via Windows installers (as long as it's on system PATH). Tremendously
useful if you're bouncing between *nix and Windows regularly.
--
Demian Brecht
@demianbrecht
http://demianbrecht.github.com
More information about the Python-list
mailing list