O'Reilly logo

Python Programming On Win32 by Mark Hammond, Andy Robinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shell Window

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.

IDLE’s shell window on Windows
Figure 4.5. IDLE’s shell window on Windows

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.

IDLE’s shell window on Unix
Figure 4.6. IDLE’s shell window on Unix

One of the first things the astute reader might query is the lack of the ... prompt in multiline statements. Using the “official” interactive Python mode or PythonWin, multiline statements normally look like:

>>> while x < ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required