I have a python module installed on my system and I\'d like to be able to see what functions/classes/methods are available in it.
I want to call the doc function
dir(module)
is the standard way when using a script or the standard interpreter, as mentioned in most answers.
However with an interactive python shell like IPython you can use tab-completion to get an overview of all objects defined in the module.
This is much more convenient, than using a script and print
to see what is defined in the module.
module.
will show you all objects defined in the module (functions, classes and so on)module.ClassX.
will show you the methods and attributes of a classmodule.function_xy?
or module.ClassX.method_xy?
will show you the docstring of that function / methodmodule.function_x??
or module.SomeClass.method_xy??
will show you the source code of the function / method.