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.<tab>
will show you all objects defined in the module (functions, classes and so on)module.ClassX.<tab>
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.