Python-doc .rst文件打开

Python rst文件打开

RST与Python类似Javadoc与Java.

如果下载了别人的Python源码,里面有rst文件夹,我们可以转为html后用浏览器打开

某个开源项目的index.rst

1.安装python的sphinx模块: 

pip install recommonmark
pip install sphinx
pip install -i http://pypi.douban.com/simple/ sphinx_rtd_theme --trusted-host pypi.douban.com

2.01-splash输出html的目录

进入source的父文件夹,比如

使用命令

sphinx-build -b html source 01-splash
# source 源文件目录
# 01-splash 输出文件目录

运行完后就可以在浏览器里查看了

 

猜你喜欢

转载自www.cnblogs.com/yoyo1216/p/11490191.html