[SciPy-user] shell for scipy

Fernando Perez fperez at pizero.colorado.edu
Thu Jan 30 15:30:06 EST 2003


On Tue, 28 Jan 2003 baecker at physik.tu-dresden.de wrote:

> In the longer run I think it would be nice
> to have some kind of worksheet environment
> (like in maple/mathematica/matlab...) which for example
> also allows to embed the results of plots and
> has a nice hierarchical help browser.
> Would something like this for example be possible with
> Scintilla (eg. under wxPython) ?
> Are the any plans in this direction ?
> 
> Arnd
> 
> On Tue, 28 Jan 2003, Yann Le Du wrote:
> 
> > On 28 Jan 2003, Otto Tronarp wrote:
> >
> > > Perhaps IPython? Haven't used it my self, but I have heard good things
> > > about it.
> > > http://www-hep.colorado.edu/~fperez/ipython/
> >
> > Yes, I use it and find it excellent.

Thanks :)  Being the main ipython developer, I figured I might want to pitch 
in a few words.  This message happens to coincide with me just having released 
ipython 0.2.14 after 50 -pre releases.  I haven't announced it anywhere, as 
I've been super busy this week. But the above-referenced url has the files 
ready for download.

I think IPython is indeed quite nice, and in combination with a solid text 
editor (Xemacs, vi, etc) I find it far better than idle. But of course, I'm 
biased :)  However, for serious work I do think there are some things in 
ipython which indeed make it better than the others:

- tight access to the underlying OS for shell-like operations. This is very 
handy when doing data manipulation.

- the @pdb command to pop up pdb 'inside' crashed code.  This often is enough 
for debugging and in my experience better/easier than stepping with a debugger 
or putting in the proverbial print statements.

- the @run command, both for fast prototyping of modules (no reload issues) 
and for profiling (-p gives direct profiler control).

- the embedding features for tricky debugging situations (think of the 
.stop/.continue commands in IDL).

- the concept of profiles, which allows ipython to adapt to multiple 
scenarios, even modifying its processing of the command-line syntax.

However, I also acknowledge that a graphical notebook-like interface would be 
a great thing to have in many cases.  My mental model of the ideal pyhton 
environment is Mathematica (even though their interface does have its rough 
edges, I love the basic idea).  'math' opens a basic command-line interface, 
while 'mathematica' gives you the notebook-based gui.  

That's exactly what I'd like to have for python: ipython as the command-line
shell, and a gui which uses ipython as its interaction engine, but which can
also save the whole session, edit across lines, embed graphics and change
fonts, etc.

Such a project is fairly ambitious, but I'd like to pitch it here to see if
there is community response. Mathematica, maple, matlab & IDL all have
graphical desktops and for scipy to dethrone the last two of them, it will 
probably need one too (I say the last two because I don't see scipy as 
competing with Mathematica, but definitely as a better environment than matlab 
or IDL).

Currently ipython is fairly solid and stable, but in need of a big internal 
cleanup.  I'm very hesitant to do much to it right now, because if the idea of 
coordinating with a graphical shell does get support from the scipy community, 
then the project will become larger.  In that case, the redesign of the 
current internals should be done with an eye on making it easy to drop ipython 
into any graphical shell (the mythical scipy graphical shell, idle, the new 
Eric editor, whatever...)

I would therefore like to hear from the scipy users/developers about interest 
on this topic.  I honestly think that ipython provides some of the most solid 
low-level interface of all the current python shells, but it's text only.  I 
definitely can't do the work of writing a large graphical layer above it, but 
I'd be more than happy to coordinate witha  larger team for the necessary 
rewrites.

If there is no interest, ipython will probably continue to slowly improve 
(it's quite good already and for text-only use I have very few things I see as 
needed improvements).  But without larger community support I doubt I will be 
able to devote any major amount of time to it.

Best regards,

Fernando.




More information about the SciPy-User mailing list