Hi all,

I'm still getting comfortable with Linux and this might be an OS
rather than a python problem.

I am trying to make a script directly executable. I've reviewed the
2nd ed of the Nutshell, and I cannot work out what I'm doing wrong.
I'm running ubunutu 6.10 (edgy eft). Here's a copy past of my command
line:

[EMAIL PROTECTED]:~/test$ which python
/usr/bin/python
[EMAIL PROTECTED]:~/test$ ls -la shebangtest.py
-rwxr-xr-- 1 brian brian 68 2006-11-04 02:29 shebangtest.py
[EMAIL PROTECTED]:~/test$ cat shebangtest.py
#!/usr/bin/python

if __name__ == '__main__':

     print "It works"
[EMAIL PROTECTED]:~/test$ shebangtest
bash: shebangtest: command not found
[EMAIL PROTECTED]:~/test$ shebangtest.py
bash: shebangtest.py: command not found

I've also tried:

#!/usr/bin python

as my shebang line.

I've been unable to get this to work. Clearly, there is something I've
misunderstood. (`#!' is not an easy thing to google for :-)

Best,

Brian vdB


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to