commands.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:vspheretools 作者: devopshq 项目源码 文件源码
def _writedoc(doc, thing, forceload=0):
    """Write HTML documentation to a file in the current directory.
    """
    try:
        obj, name = pydoc.resolve(thing, forceload)
        page = pydoc.html.page(pydoc.describe(obj), pydoc.html.document(obj, name))
        fname = os.path.join(doc, name + '.html')
        fd = open(fname, 'w')
        fd.write(page)
        fd.close()
    except (ImportError, pydoc.ErrorDuringImport):
        traceback.print_exc(sys.stderr)
    else:
        return name + '.html'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号