[IPython-dev] Putting a kernel inside a GUI (WX or Qt) application so you can run external Qt consoles against it.
Fri Aug 5 02:18:49 CDT 2011
we knew this was in principle possible given the new architecture, but
in working with a colleague today I had to actually implement it, so
I've committed these as examples (they only need 0.11 to run, so you
can just copy these files if you want to play with them, or pull from
Those two both use the same common machinery:
The idea is that you can have a full IPython kernel embedded in any
GUI app (in this case, shown with either WX or Qt), and the app can
then fire up a Qt console (or you can attach one externally). The GUI
app is modifying variables (the Count++ button) and dumping the user
namespace to the console via buttons, while the Qt console can plot
variables, run code, etc, that's in the namespace dict.
These examples show that it actually takes very little code, and that
this extra code is fairly generic (I used the same code for both the
Qt and the WX examples). In a real application it would be structured
slightly differently, but the ideas should be clear from this simple
I hope this is useful, since this is something that I've been asked
*many* times over the years.
More information about the IPython-dev