distutils changes my scripts when installing (python 2.2)

Erik Max Francis max at alcyone.com
Thu Mar 6 23:39:48 EST 2003


Jp Calderone wrote:

>   "#!/bin/env python" will use the first "python" executable found in
> the
> $PATH, whereas "#!/usr/bin/python" will only use /usr/bin/python, and
> fail
> if it is installed elsewhere.

/bin/env isn't a very good choice, since env is more portably found in
/usr/bin.  (In some rare instances it's not there, either.) 
Unfortunately env's dependence on the PATH can lead to some unpleasant
surprises when run in different environments (e.g., a cron job vs. an
interactive shell), dependent on where the Python installations are
located, particularly if there are multiple versions installed.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ Seriousness is the only refuge of the shallow.
\__/ Oscar Wilde
    WebVal / http://www.alcyone.com/pyos/webval/
 URL scanner, maintainer, and validator in Python.




More information about the Python-list mailing list