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

Roy Smith roy at panix.com
Fri May 2 10:11:36 EDT 2008


In article <87r6ckzvyv.fsf at benfinney.id.au>,
 Ben Finney <bignose+hates-spam at benfinney.id.au> wrote:

> Whereas if Python is *not* installed from an OS package, it's up to
> the sys admin to ensure that it works -- not up to my program. So I
> don't see the point in making it work by default, when what I want for
> my program is that it works *with the default Python*, not with some
> non-default installation.

Ben,

Have you ever shipped software to a customer?  Imagine the following 
conversation:

Customer: "Your product is broken.  It says it can't find python, and I 
know I have it installed".

Vendor: "Where do you have it installed?"

Customer: "In /opt/bin/python"

Vendor: "Oh, that's your problem, it HAS to be in /usr/bin/python".

Customer: "I can't install it there because <insert whatever silly reason 
the customer has>.  If you can't make your product work without requiring 
me to install python in /usr/bin, I'm afraid I can't buy your product".

Vendor: "No problem sir, I'll be happy to tell our sales folks to stop 
bothering you".

If you want to hard-code /usr/bin/python into your application, that's your 
decision.  If you would like to take on the task of convincing every 
sysadmin in the world to do things the way you think they should be done, 
have fun.



More information about the Python-list mailing list