Looking for a good interactive shell
fperez528 at yahoo.com
Tue Nov 23 01:37:36 CET 2004
> I'm looking for a replacement for the standard interactive python shell. So
> far I've tried IPython and PyCrust. I liked both, but I'm not 100% happy
> with any of them. My main complaint about IPython is its missing support for
> multiline editing. To do multiline editing, it has to start an external
> editor, but then I lose all the nice features like autocompletion.
The reason ipython lacks multiline editing, is because such a feature is beyond
what readline can provide. The only way to get it is to write a full-blown
curses (or GUI) interface. Because of my limited (time) resources, and the
portability problems of such an approach (curses doesn't work under Windows,
and is a finicky beast across platforms), I just had to omit this feature.
As Robert Kern mentioned, a (slooow) rewrite is under way (or rather, ramping
up) to enable ipython to be plugged into a GUI, with pycrust and IDLE being
likely initial targets.
In the meantime, besides Craig's vim suggestion, I can offer some more tips (I
know these are not full solutions, but they may help some):
1. You could try (X)Emacs. There is full ipython support for emacs, and with
it you can do all your editing in Emacs and pass chunks of code to ipython for
2. Use the Ctrl-p feature of readline/ipython to recall quickly previous lines.
I do some (limited to 4-6 lines) multiline editing in ipython this way, since
instead of hitting up-arrow umpteen times, you only need to type one or two
letters and Ctrl-p to recall the line you want. It's not perfect, and I
wouldn't use it for extended editing, but it helps in some cases.
More information about the Python-list