executing python code
Michael Fuhr
mfuhr at fuhr.org
Fri Nov 5 18:10:40 EST 2004
Darren Dale <dd55 at cornell.edu> writes:
> Some time ago I asked about executing a python program or script. For
> windows, I was informed that the .py extension could be added to some list
> of executable extensions, and then I could just type "mycode" instead of
> "python mycode.py". Great advice, worked like a charm.
>
> I recently jumped ship, and have been running Gentoo Linux for about two
> months. Is it possible to get the same behavior on Linux? I thought it
> would have something to do with adding the #!/usr/bin/env python line to my
> code, but I'm not sure what this is supposed to do (it didnt work, that
> much I know.)
How didn't it work? What did you do and what happened? What errors
were printed? Did you use chmod to make the script executable? Is
the script in a directory that's in your PATH? Is Python installed
on the system?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
More information about the Python-list
mailing list