C H A P T E R 1 1
environment (IDE) such as IDLE, which provides Python-specific functionality that's missing
from a standard text editor, including syntax checking, debugging facilities and the ability to run
your program without having to leave the editor . This chapter gives you instructions on how to
create Python files using IDLE, but of course, the IDE program that you choose to use for pro-
gramming is up to you . The chapter also includes instructions for running your created files
directly from the terminal, which can be used in conjunction with any text editor or other IDE .
To begin the Hello World project, open IDLE from the Programming menu in the Debian
distribution's desktop environment . If you're not using IDLE, create a blank document in
your favourite text editor and skip the rest of this paragraph . By default, IDLE opens up in
Python shell mode (see Figure 11-1), so anything you type in the initial window will be imme-
diately executed . To open a new Python project which can be executed later, click on the File
menu and choose New Window to open a blank file .
Choosing IDLE 3 from the Programming menu instead of IDLE loads the Python 3.0 version.
This includes features not available in the version of Python used by IDLE, but none of those
features are used in this chapter. You can safely load either version, and these examples will
still work.
A N I N T R O D U C T I O N T O P Y T H O N
153
Figure 11-1:
The IDLE
Python Shell
window
TIP
Need help?
Do you have a question about the Raspberry Pi and is the answer not in the manual?
Questions and answers