從GITHUB上下載下傳的python文檔有rst格式無法打開,一般有README.txt裡說明要轉換為html。原文:
You need Sphinx to build this documentation. Or you can read it in ASCII. ;)
Better run:
# pip install sphinx
and once Sphinx is installed on your system, run:
$ make html
To build a copy of HTML'ed PySNMP documentation.轉換方法:
以pysnmp為例,GitHub下載下傳的pysnmp-master檔案,檢視pysnmp-master\docs下,都是rst格式。現在我們需要轉換為html1.下載下傳sphinx
pip install sphinx2.使用sphinx轉換html
将pysnmp-master.zip解壓到你需要放置的目錄,我這裡D:\Pythonwork\pysnmp-master
找到source目錄的所在目錄,打開cmd,進入source目錄的上級目錄(我這裡source目錄在D:\Pythonwork\pysnmp-master\docs下),CD D:\Pythonwork\pysnmp-master\docs
執行轉換指令sphinx-build -b html源目錄 目标目錄,源目錄必須選擇source目錄我這裡因為已經進入了目前source的上級目錄,是以不需要絕對路徑,我的目标目錄設定為html
sphinx-build -b html source D:\Pythonwork\pysnmp-master\docs\html
完成

打開目标目錄找到html檔案,完美。