Python文档编写

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容