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

Ben Finney bignose+hates-spam at benfinney.id.au
Fri May 2 09:30:01 EDT 2008


"D'Arcy J.M. Cain" <darcy at druid.net> writes:

> On Fri, 02 May 2008 13:24:01 +1000
> Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:
> > I much prefer "#! /usr/bin/python" because I want my Python
> > programs to, by default, be run with the default Python, and
> > depend on Python being installed by the operating system's package
> > manager. On systems that use shebang lines and that actually have
> > standardised filesystem locations, the default Python is found at
> > '/usr/bin/python'.
> 
> You have lived a sheltered life.  Not every packaging system puts the
> executible in /usr/bin.  Many systems use /usr/local/bin.

"D'Arcy J.M. Cain" <darcy at druid.net> writes:

> On Fri, 02 May 2008 15:50:22 +1000
> Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:
> > They use that for the operating-system-installed default Python
> > interpreter? Colour me incredulous.
> 
> OK, let me get out my crayons.  However, note that I did not say
> "operating-system-installed."

That is, however, the context I've been explicitly using since this
sub-thread began.

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.

-- 
 \     "Nothing so needs reforming as other people's habits."  -- Mark |
  `\                                       Twain, _Pudd'n'head Wilson_ |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list