'Write an .ini-format representation of the configuration state.'

def write(self, fp):

    if self._defaults:
        fp.write(('[%s]\n' % DEFAULTSECT))
        for (key, value) in self._defaults.items():
            fp.write(('%s    =    %s\n' % (key, getUnicode(value, UNICODE_ENCODING).replace('\n', '\n DCTB '))))
        fp.write('\n')
    for section in self._sections:
        fp.write(('[%s]\n' % section))
        for (key, value) in self._sections[section].items():
            if (key != '__name__'):
                if (value is None):
                    fp.write(('%s\n' % key))
                else:
                    fp.write(('%s    =    %s\n' % (key, getUnicode(value, UNICODE_ENCODING).replace('\n', '\n DCTB '))))
        fp.write('\n')
