Python 帮助文档检索方法
一、查看python中模块的所有方法
命令行下使用pydoc命令
在命令行下运行$ pydoc modules即可查看在python交互解释器中使用help()查看
在交互式解释器中输入>>> help("modules")即可,效果跟在命令行下输入$ pydoc modules是一样的>>> help(math.sin)
Help on built-in function sin in module math:
sin(...)
sin(x)
Return the sine of x (measured in radians).
>>>查看函数信息的另一种方法print(funcname._doc)
查看模块下所有函数dir(module_name)
在python交互是解释器下导入sys模块查看
命令行下使用pip查看
使用yolk来查看
Last updated