# HG changeset patch # User Jeff Hammel # Date 1306339228 25200 # Node ID 4d3ea44fd8137a611a9f70a5e3a7e02e4a4c5228 # Parent 79676a48f6d8b305c6326634e59293c7345a46bf further spec out diff -r 79676a48f6d8 -r 4d3ea44fd813 README.txt --- a/README.txt Tue May 24 19:12:09 2011 -0700 +++ b/README.txt Wed May 25 09:00:28 2011 -0700 @@ -42,11 +42,39 @@ path may be used. In addition, other (pluggable) loading paths are available: -- override loader: [TODO] +- override loader: you can use a section name like ``[foo:bar]`` to + override variables from the ``bar`` object with variables from + ``foo``:: + + [foo:bar] + . = cats, dogs + type = count + + [bar:%(here)s/some/path.py:MyObject] + . = elephants + type = concatenate + + The above results in a JSON blob for foo like:: + + {'foo': {'args': ['elephants', 'cats', 'dogs'], + 'kwargs': {'type': 'concatenate'}, + 'path': '/location/of/ini/file/some/path.py:MyObject'}} + + ``args`` is extended. ``kwargs`` will be overridden. + +- wrappers: In addition, .ini files may include other .ini files. This allows for -encapsulation of intent of specific .ini files. +encapsulation of intent of specific .ini files:: + + [include:%(here)s/some/file.ini] +INI files have a few convenience variables: + +- %(here)s : the location of the directory the .ini file lives in +- %(app)s : used for wrappers + +Additional variables may be provided by the consumer. ----