4

I have been trying to find a way to have an IPython Shell in an wx.Frame.

Searching around in the library code or Google

haven't helped me much either.

Is there any widget that IPython provides that can be used with wx, to integrate an IPython shell into my Frame??

pradyunsg
  • 18,287
  • 11
  • 43
  • 96
  • All I can find is [this](http://ipython.org/ipython-doc/dev/interactive/reference.html#embedding-ipython). Assuming it's only capable of reading/writing from stdin/stdout, then you can change `sys.stdin` and `sys.stdout` to file-like objects which redirect I/O from some native widget in wxPython. – Aya May 03 '13 at 15:22
  • @Aya Yes, it is a good article, but I don't see how I can redirect the I/O as wx, "overshadows"(might not be the right word) the `sys.std*` vars, and uses it's own. So,(to me) it seems the only way is to give input and get output from the IPython Library.. – pradyunsg May 03 '13 at 16:03
  • 1
    You can disable that behavior in wxPython by using the `redirect` parameter when you create the `wx.App` object with something like: `my_app = wx.App(redirect=False)`, which is also really convenient when debugging application startup errors if you're running your script from a console window. – Aya May 03 '13 at 16:09

1 Answers1

0

According to the IPython docs, there is a wxPython frontend:

However, I can't really tell if that's what you want, so here are a few links on embedding IPython in wxPython:

wxPython also has it's own shell called PyCrust / PyShell that you can see in the wxPython demo package.

Community
  • 1
  • 1
Mike Driscoll
  • 32,629
  • 8
  • 45
  • 88
  • The wxPython frontend was dropped with the big reorganisation in 0.11, and 0.10 is old now. There's still support for the Wx event loop (so you can run a Wx GUI without blocking IPython), but there's no longer a ready-made widget for a shell in Wx. – Thomas K May 03 '13 at 16:34
  • The release numbering has been a bit conservative - the code reorganisation in 0.11 was more like a major version increment. I mentally divide our releases into 'classic IPython' and 'modern IPython', i.e. 0.11 and above. – Thomas K May 03 '13 at 22:00
  • @MikeDriscoll *Note: I had visited these links(except the script one)* About the links: **1.** IPython 0.10 is old.. **2.** 2009 ?? **3.** :) That is nice. **4.** That is on running a wx app and still having control of the shell. – pradyunsg May 04 '13 at 06:40
  • Okay, well I think I'm out of suggestions then. You might want to cross post to the wxPython users group – Mike Driscoll May 06 '13 at 13:37