def init_mappings(mappings):
 for (sectname, section) in mappings.items():
  for (optname, mapping) in section.items():
   default = mapping.save_default()
   log.config.vdebug('Saved default for {} -> {}: {!r}'.format(sectname, optname, default))
   value = config.get(sectname, optname)
   log.config.vdebug('Setting {} -> {} to {!r}'.format(sectname, optname, value))
   mapping.set(value)

def init_mappings ( mappings ) : for ( sectname , section ) in mappings . items ( ) : for ( optname , mapping ) in section . items ( ) : default = mapping . save_default ( ) log . config . vdebug ( 'Saved default for {} -> {}: {!r}' . format ( sectname , optname , default ) ) value = config . get ( sectname , optname ) log . config . vdebug ( 'Setting {} -> {} to {!r}' . format ( sectname , optname , value ) ) mapping . set ( value )
initialize all settings based on a settings mapping .