[IPython-User] Pretty rendering of docstrings

Carlos Córdoba ccordoba12@gmail....
Thu Jan 24 06:30:55 CST 2013


Gökhan, we already have exactly what you're asking for in Spyder. 
Docstrings are displayed in rich text mode under our plugin called 
"Object Inspector". This works for objects introspected from the Editor 
or the IPython console, using Ctrl+I. In version 2.2 (in beta) we've 
also added math rendering, using the Sphinx mathJax plugin.

As Matthias said, the plugin can't render all docstrings correctly 
(because not all are in rst) but: a) you can also view them in plain 
text and b) we plan to improve that during the next months. I think it's 
not that hard because almost all docstrings from the standard library 
are not in rst, it's not so complicated to detect if a dosctring is in 
numpydoc (using the tools provided by numpydoc) and for all the rest we 
could highlight only code snippets, if present.

Cheers,
Carlos

El 23/01/13 22:03, Gökhan Sever escribió:
> Hello,
>
> Is there any plan for IPython notebook to support pretty rendering of 
> docstrings?
>
> Take for instance:
>
> http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.lognormal.html
>
> Sphinx puts a nice rendered equation (probably via MathJax), right below:
>
> "The probability density function for the log-normal distribution is"
>
> and the layout of documentation is quite neat.
>
> Sage notebook also renders the equation fine. Can this be supported in 
> IPython notebook?
>
> I am particularly interested in equation rendering, since I am 
> planning to insert latex representation of the equations in function 
> docstrings.
>
> Thanks.
>
> -- 
> Gökhan
>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130124/0f6e2864/attachment.html 


More information about the IPython-User mailing list