How can I print Python's help page straight to stdout? How can I print Python's help page straight to stdout? unix unix

How can I print Python's help page straight to stdout?


This works for me:

import pydocimport math # testprint(pydoc.render_doc(math))


Try this?

import pydocpydoc.help(xrange)

Or if you want it in string format

pydoc.getdoc(xrange)