Entry
Why can I run an executable program using "python prog.py" but not as "./prog.py"?
Nov 2nd, 2004 07:37
Jonathan Schroder, Xcrash, Michael Hudson, Nathan Wallace, Michael Hudson
So long as your python file is executable by you, starts with
#!/path/to/executable (usually #!/usr/bin/env python)
and /path/to/executable actually exists, you might have problems with
control characters having crept into the line - try `cat -v'-ing it.
Check the file perms with 'ls -l' and if the file, in this
case "prog.py", isn't set executable make it so with 'chmod u+x
prog.py'