astropy 5.0

ParametersRaisesReturnsBackRef
get_config(packageormod=None, reload=False, rootname=None)

Parameters

packageormod : str or None

The package for which to retrieve the configuration object. If a string, it must be a valid package name, or if None , the package from which this function is called will be used.

reload : bool, optional

Reload the file, even if we have it cached.

rootname : str or None

Name of the root configuration directory. If None and packageormod is None , this defaults to be the name of the package from which this function is called. If None and packageormod is not None , this defaults to astropy .

Raises

RuntimeError

If packageormod is :None:None:`None`, but the package this item is created from cannot be determined.

Returns

cfgobj : ``configobj.ConfigObj`` or ``configobj.Section``

If the requested package is a base package, this will be the configobj.ConfigObj for that package, or if it is a subpackage or module, it will return the relevant configobj.Section object.

Gets the configuration object or section associated with a particular package or module.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

astropy.config.configuration.reload_config astropy.config.configuration.generate_config

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/config/configuration.py#510
type: <class 'function'>
Commit: