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

J Sisson sisson.j at gmail.com
Thu May 1 22:55:15 EDT 2008


The first method allows python to be installed in an alternate location
(i.e. /usr/local/bin).  "env" in this case is being used to launch python
from whatever location python is installed to.

I like to think of it as an "abstraction" of the python location to make it
"multiplatform-friendly" since not all Unix systems put python in /usr/bin.

On Fri, May 2, 2008 at 1:36 AM, Yves Dorfsman <yves at zioup.com> wrote:

> On UNIX, some people use
> #!/usr/bin/env python
>
> While other use
> #!/usr/bin/python
>
> Why is one preferred over the other one ?
>
> Thanks.
>
> --
> Yves.
> http://www.SollerS.ca
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
Computers are like air conditioners...
They quit working when you open Windows.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080502/73e97275/attachment-0001.html>


More information about the Python-list mailing list