[IPython-dev] Using jupyter_console as embedded shell

Frédéric Mantegazza mantegazza at ill.fr
Thu Dec 3 05:10:25 EST 2015


Le 03/12/2015, Thomas a écrit :

> There isn't, because it doesn't really make sense. Embedding an IPython
> shell gives you interactive access to the namespace in which you invoke
> it
> - it's like launching a debugger with pdb.set_trace(). jupyter_console is
> for communicating with a kernel in a separate process, so you can't embed
> it in the namespace where you created it.
> 
> You can embed the IPython kernel by calling IPython.embed_kernel(), and
> then connect a console to it from another terminal, if that's what you
> want.
> 
> Or if you just want to start jupyter_console programmatically, without
> worrying about the namespace, I think that's jupyter_console.app.main().
> Passing existing=True should be equivalent to --existing on the command
> line.

I see.

So, I have to move my customization of IPython (completer, custom
exceptions and so), to the kernel, right? The kernel acts as the core of
IPython?

-- 
    Frédéric MANTEGAZZA             CEA-Grenoble
    Tel.     : 33 (0) 476 207 617   INAC/SPSMS/MDN
    Fax      : 33 (0) 476 483 906   17, rue des Martyrs
    Courriel : mantegazza at ill.fr    F-38054 Grenoble Cedex 09




More information about the IPython-dev mailing list