[Tutor] New to Python and Linux
Jason M Barnes
json.barnes at gmail.com
Wed Sep 26 08:49:18 CEST 2007
Another way to execute your program is to open up your file with
gedit, and on the very first line type (sans quotes) "#!/usr/bin/env
python" by itself and save it. Then, go to the terminal like Michael
said, and cd into the directory with your file. Type "chmod 0700
your-program.py" at the prompt. This allows you to execute your
program without invoking python first. That way when you are cd'ed
into the directory that contains your program, you can type
"./your-program.py" at the prompt, and it should run.
If you're going to switch to linux, then you'll need to learn how to
make the most of your CLI. I'd suggest googling for tutorials on the
linux command line.
More information about the Tutor