Python rst文件打開
RST與Python類似Javadoc與Java.
如果下載了別人的Python源碼,里面有rst文件夾,我們可以轉為html后用瀏覽器打開
某個開源項目的index.rst
1.安裝python的sphinx模塊:
pip install sphinx pip install -i http://pypi.douban.com/simple/ sphinx_rtd_theme --trusted-host pypi.douban.com
2.build輸出html的目錄
進入doc的父文件夾,比如
python-prompt-toolkit-master>dir
python-prompt-toolkit-master 的目錄
.gitignore
.travis.yml
AUTHORS.rst
CHANGELOG
docs
examples
LICENSE
MANIFEST.in
prompt_toolkit
README.rst
setup.py
使用命令
python-prompt-toolkit-master>sphinx-build -b html docs build
docs是含有rst的目錄,build是輸出html的目錄
運行完后就可以在瀏覽器里查看了,一般從build/index.html進入