astropy 5.0

ParametersReturns
find_mod_objs(modname, onlylocals=False)
note

The returned list not include subpackages or modules of modname , nor does it include private attributes (those that begin with '_' or are not in :None:None:`__all__`).

Parameters

modname : str

The name of the module to search.

onlylocals : bool or list of str

If :None:None:`True`, only attributes that are either members of modname OR one of its modules or subpackages will be included. If it is a list of strings, those specify the possible packages that will be considered "local".

Returns

localnames : list of str

A list of the names of the attributes as they are named in the module modname .

fqnames : list of str

A list of the full qualified names of the attributes (e.g., astropy.utils.introspection.find_mod_objs ). For attributes that are simple variables, this is based on the local name, but for functions or classes it can be different if they are actually defined elsewhere and just referenced in modname .

objs : list of objects

A list of the actual attributes themselves (in the same order as the other arguments)

Returns all the public attributes of a module referenced by name.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /astropy/utils/introspection.py#325
type: <class 'function'>
Commit: