[IPython-dev] ipython sphinx directive

Gael Varoquaux gael.varoquaux@normalesup....
Sat Nov 7 03:51:02 CST 2009


On Fri, Nov 06, 2009 at 04:24:05PM -0600, John Hunter wrote:
> This works great, but as I continue my example, adding new lines of
> ipython, I have to always cut and paste the *full* plot code as the
> figure is updated, which is tedious and difficult to maintain.  What I
> really want is an ipython sphinx mode, preferably one that is pylab
> aware, so all I have to do is

>     .. ipython_pylab::

>            X = imread('moonlanding.png')
>            imshow(X, cmap='gray')

> and sphinx will pass this to an embedded ipython session, render the
> input and output prompts, and insert any figures that are created.
> Then I can update the figure in the next block

>     .. ipython_pylab::

>            clim(0, 300)
>            hot()

> and get the updated figure in my docs....

Very, very useful. I can't give much feedback, because I have no
available mental bandwidth, but I am very happy that you are tackling
this problem.

Gaël


More information about the IPython-dev mailing list