首页 > 文章 > help文档阅读

help文档阅读

方法一:

以time模块为例

C:\Program Files\cmder
λ python
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> help(time)
Help on built-in module time:

>>> help(time.time)
Help on built-in function time in module time:

>>> help(time.time())
Help on float object:

 

方法二:

使用pydoc

C:\Program Files\cmder
λ python -m pydoc -p 1234
Server ready at http://localhost:1234/
Server commands: [b]rowser, [q]uit
server>

这条命令python -m pydoc -p 1234在本地启用了一个http server,端口1234

然后使用浏览器打开http://localhost:1234/阅读help文档。

 

方法三:

还是使用pydoc

C:\Program Files\cmder
λ python -m pydoc time
Help on built-in module time:

λ python -m pydoc time.time
Help on built-in function time in time:

 

时间:2019-10-10 04:07:46阅读(39)
联系我们 - 留言反馈
© 2017 版权所有 鲁ICP备17052893号