# HG changeset patch # User Franz Glasner # Date 1522832214 -7200 # Node ID c11dd36279d9d004d9ec40ab8c91482b2b9cbf85 # Parent be6cdc9cb79c91ae94bc69ca0a6b1ff316a64274 More documentation for the configmix.py module diff -r be6cdc9cb79c -r c11dd36279d9 configmix/py.py --- a/configmix/py.py Wed Apr 04 10:12:04 2018 +0200 +++ b/configmix/py.py Wed Apr 04 10:56:54 2018 +0200 @@ -25,6 +25,18 @@ def load(filename, extract=None): + """Load Python-style configuration files. + + Files are loaded and **executed** with :func:`exec` using an empty + dict as global and local context.# + + :param filename: the path to the configuration file + :param extract: an optional list of variable names (keys) to extract + into the resulting configuration dictionary + :returns: the configuration as dictionary + :rtype: collections.OrderedDict or ordereddict.OrderedDict or dict + + """ if extract is not None: if not isinstance(extract, (type([]), type(tuple()), type(set()), )): raise TypeError("`extract' must be a sequence")