(self, name)
Add sections dynamically. With this no need to define
        each sections in initialize() method.

        TODO: config.host should be accessed as config.rest['host'].
        Remove initialize method.
Add sections dynamically. With this no need to define
        each sections in initialize() method.
Add sections dynamically . With this no need to define each sections in initialize () method .
def __getattr__(self, name):
        """Add sections dynamically. With this no need to define
        each sections in initialize() method.

        TODO: config.host should be accessed as config.rest['host'].
        Remove initialize method."""
        if self.cfg is None:
            self._read_cfg()
        try:
            return dict(self.cfg[name].items())
        except KeyError:
            return NoSectionError('No {} section found'.format(name))
def __getattr__ ( self , name ) : if self . cfg is None : self . _read_cfg ( ) try : return dict ( self . cfg [ name ] . items ( ) ) except KeyError : return NoSectionError ( 'No {} section found' . format ( name ) )