Mercurial > hgrepos > Python > libs > ConfigMix
diff doc/introduction.rst @ 171:1ff11462a5c1
The associations from filename extensions to parsers are "fnmatch" style patterns now.
Calling "configmix.set_loader" prepends to the currently defined
associations and therefore gets the highest priority.
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Thu, 25 Apr 2019 17:00:09 +0200 |
| parents | 4643763b39ee |
| children | 3d273eb13565 |
line wrap: on
line diff
--- a/doc/introduction.rst Thu Apr 25 16:14:50 2019 +0200 +++ b/doc/introduction.rst Thu Apr 25 17:00:09 2019 +0200 @@ -352,12 +352,13 @@ Associate an additional new extension (e.g. ".conf") with an existing configuration file style (e.g. YAML):: - configmix.set_loader(".conf", configmix.default_loaders[".yml"]) + configmix.set_loader("*.conf", configmix.get_loader("*.yml")) - Allow only files with extension ".cfg" in INI-style:: + Allow only files with extension ".cfg" in INI-style -- using the default + loader for INI-files:: configmix.clear_loader() - configmix.set_loader(".cfg", configmix.default_loders[".ini"]) + configmix.set_loader("*.cfg", configmix.get_default_loader("*.ini")) Just a new configuration file style:: @@ -366,4 +367,4 @@ return some_dict_alike configmix.clear_loader() - configmix.set_loader(".my.configuration", my_custom_loader) + configmix.set_loader("*.my.configuration", my_custom_loader)
