executable python scripts

graham.matthews@maths.anu.edu.au
21 Mar 1995 06:37:00 GMT

I am running python 1.1.1 under SunOS (soon to be Solaris). I want to
make some executable python scripts. I looked at the manual and it said
that to make a piece of python source executable I just needed to have,

#! /usr/local/bin/python

(where /usr/local/bin/python is the path of the python interpreter),
as the first line of the source file. I did this. I then made the
following file (called fred),

#!/data/maths/graham/APP/PYTHON/bin/python
print "a"

Now when I run fred by doing say "./fred", I get the message
"./fred: Permission denied.". I don't understand this. The python
executable is definitely at /usr/local/bin/python. Moreover it is
owned by me, and executable by ugo. The file 'fred' is also ugo+wrx.
So what am I doing wrong?

graham

PS: I have tried the !# line above with and without the space between
the ! and the /, and the same problems occur.

--
                      Je suis pour le communisme
                      Je suis pour le socialisme
                      Je suis pour le capitalisme
                     Parce que je suis opportuniste