When IDLE starts, it presents its shell window. This window is equivalent to PythonWin’s Interactive Window or the interactive Python session, and it’s where you enter arbitrary Python commands.
By now, you should be completely familiar with Python’s own interactive (command-line) mode. We first discussed this in Chapter 2, and also previously in this chapter, so you already know how to use IDLE’s Python shell window! Figure 4.5 shows the Python shell window with a few interactive commands.
Since we made a big song-and-dance about the cross-platform capabilities of IDLE, Figure 4.6 shows the Python shell window running on a Unix system. You will probably notice some subtle differences between the two windows; the fonts are different, hence the slightly different window sizes: the default is 80 × 24 character cells on all platforms. You may also notice that on Windows the Help menu is placed next to the other menus, while on Unix it’s placed to the far right of the menu bar.
One of the first things the astute reader might query is the lack of
... prompt in multiline statements. Using the
“official” interactive Python mode or PythonWin,
multiline statements normally look like:
>>> while x < ...