executing python code

Darren Dale dd55 at cornell.edu
Fri Nov 5 17:47:43 EST 2004


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.)

Could I get some advice?

Thanks,
Darren 



More information about the Python-list mailing list