Inheritance diagram for IPython.OInspect:
Tools for inspecting Python objects.
Uses syntax highlighting for presenting the various information elements.
Similar in spirit to the inspect module, but all calls take a name argument to reference the name under which an object is being read.
Print the definition header for any callable object.
If the object is a class, print the constructor information.
Print the docstring for any object.
Optional: -formatter: a function to run the docstring through for specially formatted docstrings.
Show detailed information about an object.
Optional arguments:
precomputed already.
Search namespaces with wildcards for objects.
Arguments:
searches and optionally a type specification to narrow the search to objects of that type.
Optional arguments:
- ns_search: list of namespace names to include in search.
- ignore_case(False): make the search case-insensitive.
- show_all(False): show all names, including those starting with
underscores.
Get the names and default values of a function’s arguments.
A tuple of four things is returned: (args, varargs, varkw, defaults). ‘args’ is a list of the argument names (it may contain nested lists). ‘varargs’ and ‘varkw’ are the names of the * and ** arguments or None. ‘defaults’ is an n-tuple of the default values of the last n arguments.
Modified version of inspect.getargspec from the Python Standard Library.
Stable wrapper around inspect.getdoc.
This can’t crash because of attribute problems.
It also attempts to call a getdoc() method on the given object. This allows objects which provide their docstrings via non-standard mechanisms (like Pyro proxies) to still be inspected by ipython’s ? system.
Wrapper around inspect.getsource.
This can be modified by other projects to provide customized source extraction.
Inputs:
Optional inputs:
This implementation will skip returning any output for binary objects, but custom extractors may know how to meaningfully process them.