473,395 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Looking for a good interactive shell

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
3 2351

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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave Reed | last post by:
I seem to remeber reading somewhere there was a statement you could put in your python program to stop its execution and start the interactive interpreter at that point (and then you could change...
2
by: Miki Tebeka | last post by:
Hello All, If there a way a script can tell Python to enter interactive mode even if the -i command line switch was not given? I want py2exe to create an interactive session, without writing...
2
by: Charles Krug | last post by:
List: I'm trying to us pylab to see what I'm doing with some DSP algorithms, in case my posts about convolution and ffts weren't giving it away. I've been using pylab's plot function, but I'm...
0
by: pkassianidis | last post by:
Hello everybody, I have written a python script which executes some functions and then returns to the python interactive shell prompt (In other words I use the command "#!/usr/bin/python -i "...
13
by: dmh2000 | last post by:
I am experimenting with the interactive interpreter environments of Python and Ruby and I ran into what seems to be a fundamental difference. However I may be doing something wrong in Python....
4
by: j_macaroni | last post by:
I know you can start php -a and go into interactive mode. This works well exept you have to keep putting <?php code here ; bla blah code ; Couple of problems with this. 1) Exits php when you...
2
by: Matimus | last post by:
On Apr 11, 2:32 am, Evan <xdi...@gmail.comwrote: Do you want a custom shell that does whatever you want? Or do you want an interactive python shell that has some custom commands? For the first...
3
by: R. Bernstein | last post by:
The next release of pydb will have the ability to go into ipython from inside the debugger. Sort of like how in ruby-debug you can go into irb :-) For ipython, this can be done pretty simply;...
8
by: james.kirin39 | last post by:
Hi everyone, After having used Python on Linux for some time, I now have to do Python coding on Windows. I am big fan of the interactive Python shell to test, eg, regexps. Is there an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.