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

Yves Dorfsman yves at zioup.com
Fri May 2 12:10:34 EDT 2008


Thanks everybody, I didn't mean to start a flamewar...
I do get it now, it's whatever python is in the path, vs. the specific one 
you're pointing to.

Ben Finney wrote:

> 
> No, because it's quite common for the PATH variable to have
> '/usr/local/bin' appear *before* both of '/bin' and '/usr/bin'.
> 
> If the system has a sysadmin-installed '/usr/local/bin/python'
> installed as well as the OS-installed '/usr/bin/python', then the two
> shebang options the OP raised will behave differently on such a
> system. This seems to be quite the point of the discussion.
> 

And I have to admit, I prefer specifying the version (full path) because I 
have run into too many problem when users have different PATHs and end up 
running different version of an interpreter.

Yves.
--
http://www.SollerS.ca



More information about the Python-list mailing list