Update docstring for util.read_config

master
Dustin C. Hatch 2013-01-21 22:10:24 -06:00
parent 243df2be47
commit 14c8c28b9a
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,8 @@ def read_config(filename, defaults=None):
'''Parse an ini file into a nested dictionary '''Parse an ini file into a nested dictionary
:param string filename: Path to the ini file to read :param string filename: Path to the ini file to read
:param dict defaults: (Optional) A mapping of default values that can be
used for interpolation when reading the configuration file
:returns: A dictionary whose keys correspond to the section and :returns: A dictionary whose keys correspond to the section and
option, joined with a dot character (.) option, joined with a dot character (.)
@ -101,6 +103,7 @@ def read_config(filename, defaults=None):
This dictionary can be used to configure an :py:class:`~milla.Application` This dictionary can be used to configure an :py:class:`~milla.Application`
instance by using the ``update`` method:: instance by using the ``update`` method::
config = milla.util.read_config('superheros.ini')
app = milla.Application(router) app = milla.Application(router)
app.config.update(config) app.config.update(config)
''' '''