[IPython-User] Pretty rendering of docstrings
Gökhan Sever
gokhansever@gmail....
Thu Jan 24 12:32:01 CST 2013
Hi Carlos,
Thanks for jumping in. In fact, updating my Sphinx installation to 1.1.3
and checking out spyder from hg base, I can see the docstrings for
np.random.lognormal is rendered just like I was asking for. This layout is
quite good for my documentation need. I also found the documentation source
for lognormal at
http://docs.scipy.org/numpy/source/numpy/numpy/random/mtrand/mtrand.pyx#3026
I will start from there and work on creating my long-overdue cloud physics
function library documentation project :) This will hopefully attract
others out there who prefers IDL over Python for their atmospheric science
related coding.
On Thu, Jan 24, 2013 at 5:30 AM, Carlos Córdoba <ccordoba12@gmail.com>wrote:
> 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 listIPython-User@scipy.orghttp://mail.scipy.org/mailman/listinfo/ipython-user
>
>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
--
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130124/eafd6afd/attachment-0001.html
More information about the IPython-User
mailing list