倆個步驟:ubuntu
ortonwu@ubuntu:~$ pydoc -p 8000 pydoc server ready at http://localhost:8000/
而後就能夠查到標準庫的文檔了:
瀏覽器
在Unix-like系統上通常都預裝了Python,好比個人Ubantu上就預裝了Python2.7。我本身又安裝了Python3.5 ,若是要查看Python3.5的文檔,只須要把pydoc
改成pydoc3便可
。或者在/usr/bin目錄下,把軟連接pydoc從新連接到pydoc3.5去:code
ortonwu@ubuntu:/usr/bin$ ll | grep pydoc lrwxrwxrwx 1 root root 8 Apr 1 20:11 pydoc -> pydoc2.7* -rwxr-xr-x 1 root root 79 Nov 19 01:35 pydoc2.7* lrwxrwxrwx 1 root root 8 Apr 1 20:11 pydoc3 -> pydoc3.5* -rwxr-xr-x 1 root root 79 Nov 17 11:24 pydoc3.5* ortonwu@ubuntu:/usr/bin$ sudo rm -rf pydoc ortonwu@ubuntu:/usr/bin$ sudo ln -s pydoc3.5 pydoc ortonwu@ubuntu:/usr/bin$ ll | grep pydoc lrwxrwxrwx 1 root root 8 Apr 27 02:32 pydoc -> pydoc3.5* -rwxr-xr-x 1 root root 79 Nov 19 01:35 pydoc2.7* lrwxrwxrwx 1 root root 8 Apr 1 20:11 pydoc3 -> pydoc3.5* -rwxr-xr-x 1 root root 79 Nov 17 11:24 pydoc3.5* ortonwu@ubuntu:/usr/bin$
而後再使用pydoc -p 8000
即可以查看Python 3.5的文檔了。server
(完)blog