[IPython-User] Launching IPython kernel in a new thread instead of new process

Fernando Perez fperez.net@gmail....
Fri Mar 22 02:44:52 CDT 2013

On Wed, Mar 20, 2013 at 3:23 PM, MinRK <benjaminrk@gmail.com> wrote:
> Ah, this makes more sense.  But I would actually do it a bit differently.  I
> would embed just the Kernel in your app, but then write a custom subclass of
> our notebook server that is actually much simpler than our NotebookApp.  You
> would remove the kernel management part (and possibly the notebook
> management part), since it can only talk to one kernel that it did not
> start.  Then I would start this simple webserver in a background process -
> your UI and Kernel can be in the same Cocoa process, even if the little
> tornado app that mediates their communication is in a different one.

Here's a simple example:


Marc, more than one Python interpreter per process is as of now a
no-go, due to limitations in Python itself (too much global state at
the C level).  But the above should give you easily a kernel in your
app, substitute Cocoa for the Wx code in that example.



More information about the IPython-User mailing list