[yt-dev] Fwd: [IPython-dev] Another monster landed: refactored JavaScript, new tooltips and interactive widgets in the notebook

Matthew Turk matthewturk at gmail.com
Thu May 31 18:50:10 PDT 2012

This might of interest to people here.  In theory we could refactor
Reason to use the IPython kernel, with these developments.  My
attempts to do so earlier in the year were blocked on exactly this set
of changes going in.

---------- Forwarded message ----------
From: Fernando Perez <fperez.net at gmail.com>
Date: Thu, May 31, 2012 at 8:30 PM
Subject: [IPython-dev] Another monster landed: refactored JavaScript,
new tooltips and interactive widgets in the notebook
To: IPython Development list <ipython-dev at scipy.org>, IPython User
list <ipython-user at scipy.org>

Hi folks,

After the merge of the previous big two branches (the merging of the
interactive and parallel kernels into one object and the magics
refactoring/cell support), the third monster we had in flight has now


For those of you not following the github hooks obsessively, here's
the high-level view of the goodies:

- New graphical tooltip with keyboard control: successive presses of
the TAB key will expand it, pin it for 10 s (a clock icon is shown),
and send its content to the bottom help pager (which is now

- Completer has been refactored into a new class and now can analyze
the current cell to support completions on objects that don't exist in
the kernel yet (because the cell hasn't been executed).

- All the client-side JavaScript has been decoupled to ease reuse of
parts of the machinery without having to build a full-blown notebook.
This will make it much easier to communicate with an IPython kernel
from existing web pages and to integrate single cells into other
sites, without loading the full notebook document-like UI.

- This refactoring also enables the possibility of writing dynamic
javascript widgets that are returned from Python code and that present
an interactive view to the user, with callbacks in Javascript
executing calls to the Kernel.  This will enable many interactive
elements to be added by users in notebooks.

An example of this capability has been provided as a proof of concept
in `docs/examples/widgets` that lets you directly communicate with one
or more parallel engines, acting as a mini-console for parallel
debugging and introspection.

Kudos to Brian and Matthias for the excellent work they put into this,
it was over 84 commits and involved the merging of several
intermediate pull requests.  But the goodies shipped therein should be
*very*  useful.

We've seen recently attempts at interactive plots with d3/flot and
other similar tools; now the machinery is ready to do that cleanly, so
by all means have fun!


IPython-dev mailing list
IPython-dev at scipy.org

More information about the yt-dev mailing list