加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

help文档阅读

发布时间:2020-12-20 10:21:32 所属栏目:Python 来源:网络整理
导读:方法一: 以time模块为例 C:Program Filescmderλ pythonPython 3.7.4 (tags/v3.7.4:e09359112e,Jul 8 2019,20:34:20) [MSC v.1916 64 bit (AMD64)] on win32Type " help " , " copyright " , " credits " or " license " for more information. import ti

方法一:

以time模块为例

C:Program Filescmder
λ 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 Filescmder
λ 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 Filescmder
λ python -m pydoc time
Help on built-in module time:

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读