bundles / astropy 7.0.1 / astropy / config / configuration / get_config
function
astropy.config.configuration:get_config
source: /astropy/config/configuration.py :547
Signature
def get_config ( packageormod = None , reload = False , rootname = None ) Summary
Gets the configuration object or section associated with a particular package or module.
Parameters
packageormod: str or NoneThe 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, optionalReload the file, even if we have it cached.
rootname: str or NoneName of the root configuration directory. If
NoneandpackageormodisNone, this defaults to be the name of the package from which this function is called. IfNoneandpackageormodis notNone, this defaults toastropy.
Returns
cfgobj: ``configobj.ConfigObj`` or ``configobj.Section``If the requested package is a base package, this will be the
configobj.ConfigObjfor that package, or if it is a subpackage or module, it will return the relevantconfigobj.Sectionobject.
Raises
: RuntimeErrorIf
packageormodisNone, but the package this item is created from cannot be determined.
Aliases
-
astropy.config.get_config