On 2008-05-02, Ben Finney <[EMAIL PROTECTED]> wrote: > The specified command takes the form of a fully-qualified file > path, and zero or one arguments to the program. That command > is then executed by the kernel, and the Python program file is > passed as input to the resulting process.
Just to clarify that a bit a little, the name of the file (as it was given to the "exec" system call) containing the "shebang line" is passed to the resulting process as a command-line parameter. >> Why is one preferred over the other one ? > > I've never clearly understood why people want to use "#! /usr/bin/env > python", which is prone to finding a different Python from the one > installed by the operating system. I'd be interested to see what > responses are in favour of it, and what the reasoning is. > > One possible reason is that the programmer is attempting to allow for > systems where Python has been installed, but not from an operating > system package. Exactly. the "env" approach works as long as python is installed somewhere on the PATH. "#!/usr/bin/python" will fail if python is installed in /usr/local/bin/python. -- Grant -- http://mail.python.org/mailman/listinfo/python-list