SourceForge has been redesigned. Learn more.

Embedded shell?

I have previously spoken against the embedding of shells in PyPE, primarily because I have had bad luck with certain editors crashing during experimentation. What do I mean? Take any one of a number of Python source editors with an embedded shell and try 'while 1: pass'. Note how you've essentially killed your editor? Ick.

During my use of wx.Shell, I've come to the point where embedding shells is somewhat reasonable. You can get an ugly command-line and/or Python interpreter with the current shell, but that's only one. I, like many of you, tend to have a handful of command lines open, not a few of which are Python shells, and honestly, I prefer seeing a shell with syntax highlighting.

With that said, I've taken some ideas from Orbtech's PyShell as shipped with wxPython, added remote execution capabilities, and added the ability to use ctrl+break to attempt to stop the current execution. This doesn't work all the time, so if necessary, it will close stdin on the remote shell, and kill the process after a second or third ctrl+break (automatically starting up a new shell as necessary).

My plan is to make adding a Python shell or command shell as easy as creating a new document, and probably just remove the shell tab on the bottom toolbar.

That's about all from me for right now. So much stuff to do.

Posted by Josiah Carlson 2012-09-14

Log in to post a comment.