美文网首页
Python文档编写

Python文档编写

作者: plutoese | 来源:发表于2016-07-20 16:17 被阅读48次

Python Help文档

Python帮助文档生成常用sphinx

  • Install Sphinx
    $ pip install Sphinx

  • Setting up the documentation sources
    $ sphinx-quickstart

  • Function auto manual
    sphinx-apidoc [options] -o <outputdir> <sourcedir> [pathnames ...]
    详细文档见这里
    例如
    sphinx-apidoc -F -o docs E:/gitrobot
    这里记得设置python函数库的目录。在outputdir中找到conf.py,插入下列语句sys.path.insert(0, os.path.abspath('函数库目录'))
    例如
    sys.path.insert(0, os.path.abspath('E:/gitrobot'))

  • 生成帮助文档
    允许如下命令
    $ make html

相关文章

网友评论

      本文标题:Python文档编写

      本文链接:https://www.haomeiwen.com/subject/huvvjttx.html