13

I saw this the other day (scroll all the way down to see some of the clever stuff):

http://www.mono-project.com/docs/tools+libraries/tools/repl/

And wondered whether something like this exists for Python.

So, is there a good Python GUI shell that can do stuff like that C# shell can do?

Edit: Here are links to screenshots from the article, showing what I'm interested in doing.

An example of the type of things I'm interested:

http://www.mono-project.com/archived/images/7/75/GSharpPlot.png

They are able to add hooks to produce GUI elements like the plot, or even do silly things like:

http://www.mono-project.com/archived/images/b/bf/GSharpRenderHandler.png

I don't think this is possible with any of the console shells I've tried (the regular python shell, ipython).

Edit: I'm not looking for an IDE. If you look at the link, you'll get an idea of what I want.

6
  • How about updating your question to describe your use case. What do you want to do? What do you want the system to do in response? The pictures are just pictures, and -- obviously -- hard to interpret into a use case. Don't say what you don't want. Say what you want.
    – S.Lott
    Nov 10, 2008 at 11:19
  • Why the hangup on it being a GUI? Nov 10, 2008 at 15:18
  • @S.Lott: Add hooks/builtins to display graphics inline, is one way to describe the pictures I linked to. Nov 10, 2008 at 21:18
  • I don't think you can do GTK-ish graphics in the console... Nov 10, 2008 at 21:19
  • @Marcos: He is looking for a separate interpreter that would make it possible, not a way of integrating it into the console. This is absolutely possible with a read-eval-print loop such as the Mono C# shell uses, it just has not been done.
    – bouvard
    Nov 11, 2008 at 0:50

8 Answers 8

13

One project I'm aware of that provides similar features (inline plotting, customisable rendering) is Reinteract. Another (though possibly a bit heavyweight for general usage) is SAGE which provides functionality for web-based notebooks.

These aren't quite shells - they're designed more as a mathematical notebook (so for instance, you can modify an earlier result and have the change propogate to later calculations), but they're close to what you're looking for, and could probably be modified to be used as such.

0
7

Have you looked at ipython? It's not quite as "gui". No smileys, sorry. ;-) It is a pretty good interactive shell for python though.

edit: I see you revised your question to emphasize the importance GUI. In that case, IPython wouldn't be a good match.

Might as well save you another blind alley: I went looking at DrPython hoping it would be similar to PLT's DrScheme, which looks comparable to example you've linked too. Unfortunately DrPython isn't all that much like DrScheme.

2
  • 2
    Who says no smileys! sys.displayhook=lambda x:sys.stdout.write(([':-(',':-)'][x] if isinstance(x,bool) else repr(x)) + '\n') You could even use u'\u2639\u263a'[x] on a unicode supporting console.
    – Brian
    Nov 11, 2008 at 8:39
  • @MarcosLara: there are jupyter qtconsole and jupyter notebooks. ipython is a kernel for jupyter.
    – jfs
    Sep 15, 2017 at 6:24
6

As far as I know there is nothing out there that offers the sort of whiz-bang features that the Mono guys have implemented in their new shell, but that is not to say that the "basic" python interactive shell isn't a feature-complete and powerful application. I could see something like the C# shell being developed at some point, but I think as of today those features you're pointing to are reasonably unique. One might argue that this is because nobody thought of them or, alternatively, because nobody has really had a need for them. I tend to subscribe to the latter, although I suppose both are plausible.

6

(Sorry for thread necromancy, but this page still comes up highly in a Google search and I assume there must be some interest in the subject.)

One GUI shell for Python which I believe is quite new is DreamPie. It doesn't quite go as far as the screenshots in the question, but it might be the closest available. They do at least highlight interactive graph plotting in their list of useful features.

1
  • This question still comes up highly on Google and the latest DreamPie looks like it may be a better alternative to Reinteract (voted up!). Mar 9, 2012 at 20:15
3

You're looking for Reinteract, which is a Python-based shell that at least partially inspired the C# shell you found. It's definitely still in-development, but already very useful.

2

I think that a combination of Pycrust with matplotlib can do exactly what you need. Pycrust is part of the wxPython installation, and matplotlib should be insalled separately. Both are simple to install in about 5 minutes.

Read this about integrating matplotlib with Pycrust to produce dynamic plots like the ones in the link you posted.

0
1

DreamPie is my personal favorite. It doesn't appear to be any more restrictive than CSharpRepl. For example, the graph drawing example can be done if matplotlib is installed. There is an example screenshot to this effect on DreamPie's web site (http://dreampie.sourceforge.net/).

Bpython is similar, and I like it better. But it is only available on Linux as binary.

0

Light Table is working on this. The IDE is simultaneously a REPL -- it has in-line plotting with iPython.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.