Re: Using jupyter_console as embedded shell

Thomas Kluyver <[email protected]>
Newsgroups gmane.comp.python.ipython.devel
Message-ID <CAOvn4qgB_6SY5QG8k0THM+G2kpKPxfHufgqu2ER-fu4+ro74zQ@mail.gmail.com>
On 3 December 2015 at 07:26, Frédéric Mantegazza <[email protected]> wrote:

> Is there a direct matching of the InteractiveShellEmbed in
> jupyter_console ?
>

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.

Thomas

_______________________________________________
IPython-dev mailing list
[email protected]
https://mail.scipy.org/mailman/listinfo/ipython-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.