[yt-dev] Fwd: [yt_analysis/yt] show() failure due to IPython API changes (issue #428)

Fernando Perez fperez.net at gmail.com
Tue Sep 25 14:38:55 PDT 2012


On Tue, Sep 25, 2012 at 1:45 PM, Anthony Scopatz <scopatz at gmail.com> wrote:
> Probably.  I don't know how far along they are but I think that the idea is
> for objects
> to be able to autodisplay themselves in a variety of contexts (notebook,
> command line,
> static html, etc), with the option of having distinct displays for each
> context.  This would
> allow, for instance, Plots to show themselves.  This is worth following
> more, though...

This is already very well established, and we haven't changed that
protocol since 0.12, so you guys can consider that to be pretty solid.
 Here are the two most relevant examples (these ship in our
docs/examples/notebooks directory):

1. The notebook that explains the display protocol in detail:

http://nbviewer.ipython.org/3784613/

I posted it from a gist b/c the version we ship has been stripped of
output (to keep it small). But that's just our default example after
running it.

2. An illustration of how our sympy extension takes advantage of it to
provide natural latex printing of all sympy outputs:

http://nbviewer.ipython.org/urls/raw.github.com/ipython/ipython/master/docs/examples/notebooks/sympy.ipynb

HTH,

f



More information about the yt-dev mailing list