[IPython-dev] Selecting data via http requests (event loop question?)

MinRK benjaminrk at gmail.com
Thu May 22 22:26:59 EDT 2014

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.

Here’s an example <https://gist.github.com/minrk/e30b33abeee31bc4b7c7> of
registering a simple handler, from another recent question about hooking up
a webserver in a kernel.


On Thu, May 22, 2014 at 11:45 AM, Mark Voorhies <mark.voorhies at ucsf.edu>wrote:

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

More information about the IPython-dev mailing list