[Byte-of-Python] Mistake in she-bang line

cpghost at cordula.ws cpghost at cordula.ws
Sun Feb 13 23:07:04 EST 2005


nice book :)

There's one thing that should IMHO be changed though:
Please consider replacing
  #!/usr/bin/env python

to accomodate OSes that don't place the python interpreter
in /usr/bin, like the BSDs (/usr/local/bin/python or
/usr/pkg/bin/python), Solaris (/opt/bin/python) and others.

Assuming that the python interpreter always resides in /usr/bin
or that a symlink from /usr/bin to the final destination exists
is an unportable Linuxism.

Recently, there was a heated discussion on a FreeBSD mailing
list, wether to remove the /usr/bin/perl -> /usr/local/bin/perl
symlink, so that the perl-free base system (in /usr/bin)
would be completely unpolluted by third party packages
(in /usr/local/bin), but the huge amount of perl scripts
containig #!/usr/bin/perl (instead of #!/usr/local/bin/perl)
was a hindrance.

With python, things are (fortunately) not that bad (yet!).
Teaching people to use #!/usr/bin/env python instead
of #!/usr/bin/python from the very beginning would be a
great thing to do.


Cordula's Web. http://www.cordula.ws/

More information about the Byte-of-Python mailing list