发布时间:2019-09-26 07:32:38编辑:auto阅读(2331)
俩个步骤:
在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学习之练习题
51673
51328
41764
38542
33018
30037
28708
23690
23610
21970
2156°
2864°
2387°
2327°
2867°
2339°
3126°
5125°
4962°
3542°