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

Torsten Bronger bronger at physik.rwth-aachen.de
Fri May 2 10:26:51 EDT 2008


Hallöchen!

D'Arcy J.M. Cain writes:

> On Fri, 02 May 2008 23:30:01 +1000
> Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:
>
>> 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.
>
> [...]
>
> Certainly #! /usr/bin/python is fine if you never expect your
> software to run outside of your own little corner of the world but
> you asked why people prefer the env version and the answer is that
> we want to write software that runs everywhere that Python runs.

Granted, but you must draw the line somewhere anyway.  I cannot
pollute my program with hundreds of if clauses just to make it work
on every quirky system.  It's the *systems* where the streamlining
must happen, not the programs.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                                      Jabber ID: bronger at jabber.org
               (See http://ime.webhop.org for further contact info.)



More information about the Python-list mailing list