[IPython-dev] %page help(x)

Hans Meine hans_meine at gmx.net
Thu Oct 27 04:37:18 EDT 2011


Am Mittwoch, 26. Oktober 2011, 22:33:10 schrieb Mark Voorhies:
> Sounds good.  For the impatient, here's a naive working version:
> 
>     def magic_help(self, s):
>         """Retrieve the pydoc help for an object and display it through a
> pager. """
>         info = self._ofind(s)
>         if info['found']:
>             import pydoc
>             page.page(pydoc.plain(pydoc.render_doc(info["obj"])))
>         else:
>             print 'Object `%s` not found' % s

Would be interesting to see how easy it is to let this render HTML for the 
notebook!  (Actually, I’d like to add such render capabilities e.g. for image 
objects anyhow.)

Have a nice day,
  Hans



More information about the IPython-dev mailing list