我的系统上安装了一个Python模块,我希望能够看到其中有哪些函数/类/方法.
我想对每一个调用help
函数.在Ruby中,我可以做一些类似ClassName.methods
的事情来获得该类中所有可用方法的列表.Python中有类似的东西吗?
例如:
from somemodule import foo
print(foo.methods) # or whatever is the correct method to call
我的系统上安装了一个Python模块,我希望能够看到其中有哪些函数/类/方法.
我想对每一个调用help
函数.在Ruby中,我可以做一些类似ClassName.methods
的事情来获得该类中所有可用方法的列表.Python中有类似的东西吗?
例如:
from somemodule import foo
print(foo.methods) # or whatever is the correct method to call