[IPython-User] View rendered reStructuredText (Sphinx) docstrings in iPython?
Thu Jan 26 14:35:03 CST 2012
On Thu, Jan 26, 2012 at 8:06 AM, Thomas Kluyver <email@example.com> wrote:
> I think probably the best approach would be to make an extension (
> http://ipython.org/ipython-doc/stable/config/extensions/index.html ), which
> would subclass Inspector, overriding the pinfo method with one that produced
> an HTML result to send to the frontend.
Note that we already have support for sending *both* html and
plaintext to the pager, you can see it by opening a qtconsole and then
opening a text console with
ipython console --existing
Then type %guiref in both. The qt one will show the html formatted
help, while the text console will show the basic text.
So the ideal path would be an extension that simply uses docutils to
emit plaintext from the docstrings stripped of reST markup as well as
html, and sends both outputs. This way, the clients that can show
html will use it and the text terminal will get more readable
This would need to be optional b/c we don't want to make docutils a
mandatory requirement, but if it's included in ipython, then users who
want it can just enable it in their default profile.
More information about the IPython-User