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

MinRK benjaminrk@gmail....
Tue Mar 19 11:33:44 CDT 2013

On Mon, Mar 18, 2013 at 10:29 PM, Marc Liyanage <marc@entropy.ch> wrote:

> When I launch IPython notebook, a new process is launched for the kernel.
> I was wondering if it's possible to prevent that and instead run the kernel
> in a new thread of the same process. I can use the C API and instantiate
> multiple Python environments if that helps.
> There are two reasons why I'd like to avoid forking:
> 1.) On OS X, the process gets killed if it is already multithreaded, and
> for a GUI app that's always the case
> 2.) I'd like to use the Objective-C bridge and let the Python code access
> Obj-C objects in the same process

> Is this possible, or is IPython fundamentally based on fork/exec?

You would definitely need to start a new Python, because there can only be
one Kernel in a given Python environment.  I've never thought about
multiple Pythons in a single process - you would definitely have problems
when users interrupt or restart kernels, since that's based on process

My guess is that this is probably not going to work without significant
restructuring of IPython, which is unlikely to happen.

> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130319/fe8290ee/attachment-0001.html 

More information about the IPython-User mailing list