Introduction
Python comes with an editor named IDLE (named for Eric Idle, the Monty Python performer.)
IDLE is discussed in the Miller/Ranum textbook on pp. 9–10.
This document is not a complete introduction to IDLE
Instead, it is designed to provide some hints, tips and tricks that may not be immediately obvious, and pointers to work arounds for problems that may arise in working with IDLE in CS8
If, instead, you want some general information about IDLE, try these links:
Documentation
Tutorials
Common problems
IDLE can't bind TCP/IP port 8833...
A common problem that occurs when using IDLE is this:
- First it gets "stuck"—i.e. non-responsive, requiring you to "Force Quit" the application
- Then, when you try to restart it, you get this error message (or something similar): IDLE can't bind TCP/IP port 8833, which is necessary to communicate, etc. etc. (see picture below)
The way to fix this problem, as simplistic as it sounds, is usually to wait about 30 seconds, and try again.
- What is happening is that that the different parts of IDLE communicate with each other using something called TCP/IP—the same method of communication that is used on the Internet. This happens even when you are running all the parts of IDLE on the same machine.
- When you force quit IDLE, these connections are severed—and there is a rule in the TCP part of TCP/IP that you have to wait appoximately 30 seconds before you can reuse the same "port number".
- If waiting 30 seconds doesn't work, it may be because you have another instance of IDLE that is still running on the same machine, and stronger measures may be needed to solve the problem.

Recalling previous commands at the Python prompt in IDLE
(This one is mainly for instructors, and others who are "old hands" and command line interfaces.)
Those who've worked with command line interfaces may be used to hitting the "up arrow" to bring back previous commands in IDLE. Instead, in IDLE, the up arrow moves you around the screen. This can be frustrating at first, but the IDLE folks are convinced that this is a less confusing behavior for beginning programmers.
In the meantime, for the "old school" folks
there are two different work arounds, using opposite strategies:
- Adapt yourself to IDLE: Insted of hitting the up arrow to bring back a previous command, if you just put your cursor on the previous command you want to repeat and then press "enter", that command will be repeated at the current command prompt. Press enter again, and the command gets executed.
- Force IDLE to adapt itself to you: If you insist on making the arrow keys in the IDLE command prompt window work like those in every other command prompt, you can do this. Go to the "Options" menu, select "Configure IDLE", and then "Keys". Changing the key that is associated with the "previous command" and "next command" actions to be the up arrow, and down arrow, respectively.
Last update: P. Conrad, 05/24/2009