发布时间:2019-09-26 07:32:38编辑:auto阅读(2263)
俩个步骤:
在Linux终端下输入:
ortonwu@ubuntu:~$ pydoc -p 8000pydoc server ready at http://localhost:8000/
打开浏览器,在地址栏输入 http://localhost:8000/
然后就可以查到标准库的文档了:
在Unix-like系统上一般都预装了Python,比如我的Ubantu上就预装了Python2.7。我自己又安装了Python3.5 ,如果要查看Python3.5的文档,只需要把pydoc 改为pydoc3即可。或者在/usr/bin目录下,把软链接pydoc重新链接到pydoc3.5去:
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的文档了。
转载自:http://www.cnblogs.com/QG-whz/p/6775302.html
上一篇: Python3 异步IO--async/
下一篇: python3学习之练习题
51261
50700
41299
38119
32578
29485
28342
23203
23173
21500
1574°
2292°
1901°
1843°
2152°
1884°
2573°
4312°
4161°
2969°