Hardware Reference
In-Depth Information
Figure 11-3:
Running
helloworld
.py in IDLE
If you created the helloworld.py program in a text editor, you'll need to open a terminal
window from the Accessories menu on the desktop. If you saved the ile anywhere except
your home directory, you'll also have to use the cd command to change to that directory (see
Chapter 2, “Linux System Administration”). Once you're in the right directory, you can run
your program by typing the following:
python helloworld.py
his tells the operating system to run Python and then load the helloworld.py ile for
execution. Unlike the Python shell in IDLE, Python will quit when it reaches the end of the
ile and return you to the terminal. he result, however, is the same: the message Hello,
World! is printed to the standard output (see Figure 11-4).
Figure 11-4:
Running
helloworld
.py at the
terminal
Search WWH ::




Custom Search