def replace_help(namespace):
def _help(*args):
# because of how the console works. we need our own help() pager func.
# replace the bold function because it adds crazy chars
import pydoc
pydoc.getpager = lambda: pydoc.plainpager
pydoc.Helper.getline = lambda self, prompt: None
pydoc.TextDoc.use_bold = lambda self, text: text
pydoc.help(*args)
namespace["help"] = _help
评论列表
文章目录