By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,857 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,857 IT Pros & Developers. It's quick & easy.

Looking for a good interactive shell

P: n/a
Hi!

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.

PyCrust supports multiline editing, but the autocompletion is not as good as
in IPython. It also lacks many of IPython's advanced features, like
pdb-integration, magic commands and custom macros.

Does anyone know of any other interactive python shells with good code
completion and multiline editing?

-Tomas
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

I'm a ipython guy, since I just found it a few weeks ago. I LOVE it!
I have all but replaced zsh with the pysh version of ipython. Anyways,
just use VIM as your external editor :P

http://www.vim.org/scripts/script.php?script_id=850

That is the python autocomplete stuff for vim. Obviously you could
use any editor you like, and right now I'm using textmate, a beautiful
little OSX editor(not free however).

Anyways, ipython, with vim and pydiction gives you mutliline
editing(it's still an external editor)....

You can actually do multiline editing in ipython, with the up and down
arrows. I do quite a bit right there..

Otherwise I don't know of anything else that exists, I just learned
about pycrust today, but after looking I think I'm too addicted to pysh
to even try it.

P.S. I'm not trying to start an external editor war, most good external
editors will do command completion for python I imagine.

Hope this helps,
Craig

On 2004-11-21 06:11:27 -0700, "Tomas" <1c**********@sneakemail.com> said:
Hi!

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.

PyCrust supports multiline editing, but the autocompletion is not as
good as in IPython. It also lacks many of IPython's advanced features,
like pdb-integration, magic commands and custom macros.

Does anyone know of any other interactive python shells with good code
completion and multiline editing?

-Tomas

Jul 18 '05 #2

P: n/a
Tomas wrote:
Hi!

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.

PyCrust supports multiline editing, but the autocompletion is not as good as
in IPython. It also lacks many of IPython's advanced features, like
pdb-integration, magic commands and custom macros.

Does anyone know of any other interactive python shells with good code
completion and multiline editing?


Not really. IPython is being rewritten to be more flexible and modular
so that the niceties like pdb integration, magic commands, and macros
can be integrated into PyShell, for example.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
Jul 18 '05 #3

P: n/a
Tomas wrote:
Hi!

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
execution.

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.

Cheers,

f

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.