Is there a good Python GUI shell?

2019-04-04 18:17发布

问题:

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.

回答1:

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.



回答2:

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.



回答3:

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.



回答4:

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



回答5:

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.



回答6:

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.



回答7:

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.



回答8:

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