Better interactive shell for ActivePython

ActivePython users on Linux or MacOSX may have noted that the arrow keys do not work properly in the command-line Python shell. When you hit up-arrow in the shell, ActivePython gives you “^[[A“. This is because ActivePython does not include GNU readline due to licensing restrictions.

Fortunately, ActivePython comes with PyPM (Python Package Manager), using which you can install readline yourself. While you’re doing that, you might also want to try IPython, which provides tab completion and a number of other nifty features.

If you are using Linux or MacOSX, then all you need to do is type the following in Terminal:

$ pypm install readline
$ pypm install ipython

On Windows, in the command prompt window:

C:\> pypm install pyreadline
C:\> pypm install ipython

You’ll need ActivePython 2.6.4.10 or above installed (3.x is not supported by PyPM yet). To learn about IPython, see Jeff Rush’s video demonstrations.

sridharr