def _read_dict(configparser, dictionary):
 for (section, keys) in dictionary.items():
  section = str(section)
  configparser.add_section(section)
  for (key, value) in keys.items():
   key = configparser.optionxform(str(key))
   if (value is not None):
    value = str(value)
   configparser.set(section, key, value)

def _read_dict ( configparser , dictionary ) : for ( section , keys ) in dictionary . items ( ) : section = str ( section ) configparser . add_section ( section ) for ( key , value ) in keys . items ( ) : key = configparser . optionxform ( str ( key ) ) if ( value is not None ) : value = str ( value ) configparser . set ( section , key , value )
cribbed from python3s configparser .