[IPython-dev] Multiple front ends connecting to same kernel

Tom Quarendon tom.quarendon at teamwpc.co.uk
Fri Oct 23 03:04:12 EDT 2015

OK, I understand.
That option kind of works for the console case (the ANSI formatting characters get all messed up, but the output shows at least).
I was assuming that I’d done something wrong in my kernel, not putting the right topic on the pub messages or something, but since I couldn’t get the behaviour to work anywhere I was then confused as to whether it was indeed supposed to work.

Thanks for your help anyway.

From: IPython-dev [mailto:ipython-dev-bounces at scipy.org] On Behalf Of Matthias Bussonnier
Sent: 22 October 2015 17:54
To: IPython developers list <ipython-dev at scipy.org>
Subject: Re: [IPython-dev] Multiple front ends connecting to same kernel

Hi Tom,

On Oct 22, 2015, at 08:50, Tom Quarendon <tom.quarendon at teamwpc.co.uk<mailto:tom.quarendon at teamwpc.co.uk>> wrote:

If I connect multiple front ends to the same jupyter/ipython kernel, then having read the message docs I naively expected that everything I did on one would get mirrored on the other. So if I create a cell and run it on one front end, I naively expected that the other front end would display the executed cell text along with any output.
However this doesn’t happen.
Is this as expected? I rather assumed that the point of everything being sent out on the iopub socket was to make collaboration between front ends and sharing of kernels possible.

All the front-end do receive the broadcasted messages, the front-end can then decide what to do with these input/output.
IIRC the ipython console will show other outputs that comes don’t originate from them, but not all client handle that.

You might need to set --ZMQTerminalInteractiveShell.include_other_output=True on the command line arguments or configuration:

In [7]:
[remote] In [7]: "hey I'm remote"
[remote] Out[7]: "hey I'm remote"

In [7]:

In the notebook in particular, what to do with other input/output is not obvious. Do you append it at the end ? Replace current cell ?
Append just after current cells ? Just before ?

Keep in mind that kernel is not aware it is run from a notebook in the case of a notebook, so there is work in progress to synchronize
the state of multiple notebook, but this is independent from what the kernel broadcasts.

Does that make sens ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20151023/9fae81e2/attachment.html>

More information about the IPython-dev mailing list