> Quick question:
> Ben has committed a very basic Python script to serve as the basis for
> the commandline client test suite. (Thanks Ben! I have little time
> or mind to hack since I'm moving to California in two weeks.)
> Anyway, I tried to run the script and immediately discovered that the
> shebang line was #!/usr/local/bin/python, which does not exist on my
> system. I have /usr/bin/python.
> So the question is how to rectify this.
> One way is to have autogen.sh or configure determine where python is
> and modify the shebang line of the script accordingly.
> Another way that just occured to me is to just invoke the test script
> with python like so:
> $ python ./client_test.py
> Autogen.sh or configure could then just make sure python in in the
> user's PATH.
> Is there a conventional or right way to deal with this that I am
> missing, or have I already hit on it?
The python tutorial says:
2.2.2 Executable Python Scripts
On BSD'ish Unix systems, Python scripts can be made directly
executable, like shell scripts, by putting the line
(assuming that the interpreter is on the user's $PATH) at the
beginning of the script and giving the file an executable
mode. The "#!" must be the first two characters of the file.
Received on Sat Oct 21 14:36:28 2006