(self, filename=None)
Creates a new configuration instance.

        @param filename: file or file pointer to be read. Can be omitted.
Creates a new configuration instance.
Creates a new configuration instance .
def __init__(self, filename=None):
        """Creates a new configuration instance.

        @param filename: file or file pointer to be read. Can be omitted.
        """
        self._config = ConfigParser()
        self._filename = None

        # Create default sections
        for sec in self._sections:
            self._config.add_section(sec)
        # Create default values
        for name, definition in self._definitions.items():
            if "default" in definition:
                self[name] = definition["default"]

        if filename is not None:
            self.load(filename)
def __init__ ( self , filename = None ) : self . _config = ConfigParser ( ) self . _filename = None # Create default sections for sec in self . _sections : self . _config . add_section ( sec ) # Create default values for name , definition in self . _definitions . items ( ) : if "default" in definition : self [ name ] = definition [ "default" ] if filename is not None : self . load ( filename )