avoiding long paths to interpreter

Erik Max Francis max at alcyone.com
Wed Jan 15 21:42:46 EST 2003


Tim Cargile wrote:

> There is a FAQ 4.63 from python.org regarding this but,
> as Erik Max Francis has pointed out in this thread, there may be
> limitations w/r '/usr/bin/env' that may eliminate using it and require
> use of the following (as the first three lines of a python module
> that is desired to be run):
> 
>   #! /bin/sh
>   """:"
>   exec python $0 ${1+"$@"}
>   """

This doesn't really resolve the issue; the Python interpreter it invokes
is still PATH-dependent, which was the problem with /usr/bin/env.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ And there inside our private war / I died the night before
\__/ Sade
    Bosskey.net: Counter-Strike / http://www.bosskey.net/cs/
 A personal guide to Counter-Strike.




More information about the Python-list mailing list