<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 8, 2014 at 10:42 PM, Andrew Chen <span dir="ltr"><<a href="mailto:chenjandrew@gmail.com" target="_blank">chenjandrew@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>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.<br>
</div><div><br></div><div>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”. </div>
<div><br></div><div>I also tried to use standard python threads, and attempted to use the advice from</div><div>this thread to redirect the cell output: <a href="http://stackoverflow.com/questions/14393989/per-cell-output-for-threaded-ipython-notebooks" target="_blank">http://stackoverflow.com/questions/14393989/per-cell-output-for-threaded-ipython-notebooks</a></div>
<div>however, it did not work as advertised, and threads have a nasty habit of being difficult to debug.</div><div><br></div><div>I’m curious if this is possible, and what I would need to do/look at to enable this functionality.</div>
</div></blockquote><div><br></div><div>It probably doesn't help you, but we have implemented this behavior in our IronPython kernel [1]. You need only issue:</div><div><br></div><div>session = calico.GetSession()<br></div>
<div>session.SetBlocking(False)</div><div><br></div><div>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.</div>
<div><br></div><div>We have most of the IPy 2.0 widget functionality, but no scipy, numpy, etc.</div><div><br></div><div>-Doug</div><div><br></div><div>[1] - <a href="http://calicoproject.org/">http://calicoproject.org/</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<div><br></div><div>Thanks,</div><div>Andrew</div></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div></div>