[IPython-dev] running multiple cells simultaneously

Doug Blank doug.blank at gmail.com
Tue Jul 8 23:04:18 EDT 2014


On Tue, Jul 8, 2014 at 10:42 PM, Andrew Chen <chenjandrew at gmail.com> wrote:

> I’m interested in being able to run mutiple ipython notebook cells
> simultaneously: for example, to run a loop in once cell, and use another
> loop with interactive widgets to tune some parameter of the loop in the
> first cell.
>
> I am aware of the ipython.parallel, but this seems doesn’t seem perfectly
> relevant because the parallel interface is still a blocking REPL loop. The
> interaction (as I understand it) is “read -
> EvaluateOnSeparateProcesses/Kernels - PrintAllResultsFromProcesses”, where
> I am interested in essentially being able to have “read-evaluate….<switch
> to a different cell> read-evaluate-print <switch back>... print”.
>
> I also tried to use standard python threads, and attempted to use the
> advice from
> this thread to redirect the cell output:
> http://stackoverflow.com/questions/14393989/per-cell-output-for-threaded-ipython-notebooks
> however, it did not work as advertised, and threads have a nasty habit of
> being difficult to debug.
>
> I’m curious if this is possible, and what I would need to do/look at to
> enable this functionality.
>

It probably doesn't help you, but we have implemented this behavior in our
IronPython kernel [1]. You need only issue:

session = calico.GetSession()
session.SetBlocking(False)

Cells then no longer wait for execution completion, and the kernel can
accept further commands to execute. Currently, however, we don't have any
way to access those threads that continue to run.

We have most of the IPy 2.0 widget functionality, but no scipy, numpy, etc.

-Doug

[1] - http://calicoproject.org/


>
> Thanks,
> Andrew
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140708/0d4d04a4/attachment.html>


More information about the IPython-dev mailing list