directly executing a python script in Unix
Oleg Broytmann
phd at phd.pp.ru
Tue Feb 5 08:54:38 EST 2002
On Tue, Feb 05, 2002 at 05:47:47AM -0800, Marc Laymon wrote:
> (laymon) [29] ls -l retest.py
> -rwxr-xr-x 1 laymon omtool 1747 Feb 4 10:55 retest.py*
>
> I can duplicate the error message with a perl script by changing
> "#!/usr/bin/perl" to "#!/usr/bin/foo", so it seems that for some
> reason, Unix can't find python, but since /usr/bin is in my path
> and I am explicitly giving the command "usr/bin/python",
> I can't figure out why. Anybody have any other ideas ?
Check, if python binary is executable by you. Check that the line
"#!/usr/bin/python" contains only these symbols and nothing else. For
example, UNIX python does not like DOS line endings (CR+LF). UNIX python
prefers only UNIX line endings (LF).
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list