问问题
1092 次
1 回答
6
In python 2, you can remove the boldface sequences with pydoc.plain
:
pydoc.plain(pydoc.render_doc(help))
>>> help(pydoc.plain)
Help on function plain in module pydoc:
plain(text)
Remove boldface formatting from text.
In python 3 pydoc.render_doc
accepts a renderer
:
pydoc.render_doc(help, renderer=pydoc.plaintext)
于 2013-02-28T11:01:37.623 回答