Hi folks!
I am running Ubuntu 10.04 Lucid.
I recently wrote a script (hello.py) in Python and placed it in /usr/local/bin. The first line of the program isand I double-checked that it is marked as executable. Furthermore, I double checked that the newline character after the first line of the program was "\n" rather than "\r\n". If I use the commands "./hello.py" or "python hello.py" while in the /usr/local/bin directory, the script successfully executes, but if I move to an arbitrary directory and try either of these commands, I get "Command not found" and "No such file or directory" respectively.Code:#!/usr/bin/python
Running "ls -l" in /usr/local/bin returns the following results:
-rwxr-xr-x 1 root root 40 2010-07-06 15:00 hello.py
I have also double-checked that /usr/local/bin is listed when I run the command "echo $PATH".
Any ideas on why this isn't working? Need any further information to help with diagnosis? Thanks!
Bookmarks