<div class="gmail_quote">On 3 November 2011 10:31, Emmanuel Bacry <span dir="ltr"><<a href="mailto:emmanuel.bacry@polytechnique.fr">emmanuel.bacry@polytechnique.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div id=":11r">Let's say I have a wx console widget ready, the wx main loop is running.<br>
Now I want to have a ipython shell object available, with stdin and stdout<br>
redirected,<br>
so that I can send to it input and get from it the output.</div></blockquote></div><br>How does a Wx console widget work? I can't find a reference to it in the Wx docs.<br><br>There is a protocol to run IPython in a separate process from the frontend. This is what the Qt console uses. Requests and replies are packed into JSON, and sent over ZMQ. There are message types for execution, tab completion, history, etc.<br>

<br><a href="http://ipython.org/ipython-doc/dev/development/messaging.html">http://ipython.org/ipython-doc/dev/development/messaging.html</a><br><br>If the console widget is a terminal emulator, a simple shortcut may be to start plain ipython in that terminal.<br>

<br>At the moment, I don't think there's a good way to embed IPython in a GUI without starting a separate process, but this is something we want to get round to.<br><br>Best wishes,<br>Thomas<br>