<div dir="ltr"><div class="markdown-here-wrapper" style><p style="margin:1.2em 0px!important">Since the IPython kernel uses the tornado eventloop, so you can register handlers with tornado’s own HTTPServer, which will automatically be integrated into the already running loop.</p>


<p style="margin:1.2em 0px!important">Here’s <a href="https://gist.github.com/minrk/e30b33abeee31bc4b7c7">an example</a> of registering a simple handler, from another recent question about hooking up a webserver in a kernel.</p>


<p style="margin:1.2em 0px!important">-MinRK</p>
<div title="MDH:U2luY2UgdGhlIElQeXRob24ga2VybmVsIHVzZXMgdGhlIHRvcm5hZG8gZXZlbnRsb29wLCBzbyB5
b3UgY2FuIHJlZ2lzdGVyIGhhbmRsZXJzIHdpdGggdG9ybmFkbydzIG93biBIVFRQU2VydmVyLCB3
aGljaCB3aWxsIGF1dG9tYXRpY2FsbHkgYmUgaW50ZWdyYXRlZCBpbnRvIHRoZSBhbHJlYWR5IHJ1
bm5pbmcgbG9vcC48ZGl2Pjxicj48L2Rpdj48ZGl2PkhlcmUncyBbYW4gZXhhbXBsZV0oaHR0cHM6
Ly9naXN0LmdpdGh1Yi5jb20vbWlucmsvZTMwYjMzYWJlZWUzMWJjNGI3YzcpIG9mIHJlZ2lzdGVy
aW5nIGEgc2ltcGxlIGhhbmRsZXIsIGZyb20gYW5vdGhlciByZWNlbnQgcXVlc3Rpb24gYWJvdXQg
aG9va2luZyB1cCBhIHdlYnNlcnZlciBpbiBhIGtlcm5lbC48YnI+PC9kaXY+PGRpdj48YnI+PC9k
aXY+PGRpdj4tTWluUks8L2Rpdj4=" style="height:0;font-size:0em;padding:0;margin:0">​</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 22, 2014 at 11:45 AM, Mark Voorhies <span dir="ltr"><<a href="mailto:mark.voorhies@ucsf.edu" target="_blank">mark.voorhies@ucsf.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A lot of visualization tools for genomic data can emit an http request in response to selecting a gene<br>
(e.g., JavaTreeView and MeV (expression profiles and other matrix/dendrogram data),<br>
        MochiView (deep sequencing and other genome position vs. scalar data),<br>
        CytoScape (large network data -- interactive and scales better than GraphViz))<br>
<br>
I am generating related, non-inlined plots in an IPython session and would like to update selections<br>
on these plots in response to selections in the external programs.<br>
<br>
A naive approach would be to listen for the HTTP requests using something based on BaseHTTPServer from the standard library;<br>
for this case, is there a straightforward way to include the server's polling loop in the kernel's event loop<br>
(e.g., something analogous to what's done for GUI event loops)?<br>
<br>
Alternatively, is there a way to hook into Tornado directly, or is there a better approach that I'm not thinking of?<br>
<br>
Thanks in advance for any advice,<br>
<br>
Mark<br>
<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>
</blockquote></div><br></div>