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

Jeroen Ruigrok van der Werven asmodai at in-nomine.org
Fri May 2 03:54:05 EDT 2008


-On [20080502 07:51], Ben Finney (bignose+hates-spam at benfinney.id.au) wrote:
>To my mind, the Python interpreter installed by a package as
>distributed with the OS *is* OS territory and belongs in /usr/bin/.

That's the difference with a distribution, such as Linux, and full OSes ,
such as BSDs or commercial Unix variants. They prefer to keep a pristine
state for the OS vendor files versus what the user can opt to install
himself, hence the /usr/bin - /usr/local/bin separation. Same for sbin, lib,
and so on. It effectively guarantees you can nuke /usr/local without ill
consequences for your OS.

Different philosophies, but after having spent more than 10+ years on too
many Unix and Unix-like systems I know the importance of platform
portability a bit too much and hardcoding a shebang sequence is not the
solution in general. Using env is the, arguably, best solution available.

-- 
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/ | GPG: 2EAC625B
Felix, qui potuit rerum cognoscere causas...



More information about the Python-list mailing list