2.2 IDLE basics

This section describes the IDLE application that you will be using when you start writing your own Python programs in the next chapter. You will probably need to refer back to it when you start working through Chapter 3.

IDLE is Python's Integrated DeveLopment Environment; in other words it is an application which enables you to both write and run Python programs. 2.2

To start up IDLE type idle at the shell prompt and press the Return key:

    rayleigh% idle

Note: idle is typed entirely in lower case--see Section 2.4, ``Case sensitivity''.

At this point, you may wish to minimise the Terminal window; do NOT close it or IDLE will be killed!

After a few seconds a new window called Python Shell will appear. This is IDLE's interface to the Python interpreter. An interpreter is a program which translates the program source code you enter into machine code which the computer can understand and run. Chapter 3 explains all about using the Python interpreter.

IDLE also includes an editor which is an application, rather like a simple word-processor, that you use to write programs (or indeed any kind of text). IDLE's editor has been customized to make it particularly useful for writing Python programs, and it should be fairly intuitive to use. Documents are opened, closed and saved by selecting commands in the File menu.


... programs.2.2
If you are familiar with Unix or Linux you may alternatively use your favourite Unix text-editor to write your Python programs, and then run them yourself using the python command. However, IDLE does provide a nice environment for developing Python code, so we recommend you try using it.