James G. Sack (jim) wrote:
Nowadays, I tend to just use
#!/usr/bin/python
..but perhaps others can comment on their preferences.
Sigh. All the world is Linux...not!
Congratulations. Your script just failed on Solaris, Cygwin, FreeBSD, etc.
Don't do that. The whole point of:
#!/usr/bin/env python
Is that /usr/bin/env is almost *always* in that specific place for a
*nix system. Python often is not. In addition, sometimes you need to
run different versions of Python for different users, and you just
blocked any ability to do that.
In addition, using env allows people to install Python in non-standard
places and to still use your scripts without modification.
In short, hard coding the path is bad. Even hard coding env is annoying
but is the least bad option.
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list