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

Thorsten Kampe thorsten at thorstenkampe.de
Fri May 2 09:51:53 EDT 2008


* Ben Finney (Fri, 02 May 2008 23:30:01 +1000)
> The OP was asking why people prefer on over the other. My answer is
> that I prefer specifying "give me the default OS Python" because
> anything not installed by the OS is to non-standardised for me to
> worry about.
> 
> Others may prefer something different, but then they get to wear
> whatever problems occur as a result of that choice. I continue to be
> bemused by that preference, and nothing that I've seen so far in this
> thread illuminates the issue more.

You're missing the point. Apart from the really dubious terms you use 
("OS installable package"), using env in the first line has exactly the 
effect to use the default path of Python (which is the first entry in 
your path) and not some hard-coded path (which might not even exist).

Thorsten



More information about the Python-list mailing list