def load_config(settings):
    '''Load settings from configfile'''
    config = ConfigParser()
    section = 'pgdocgen'
    try:
        config.read(settings['configfile'])
    except Exception as e:
        sys.stderr.write('Failed to read config: ' + str(e))
        sys.exit(1)
    for option in config.options(section):
        settings[option] = config.get(section, option)
    return settings
def load_config ( settings ) : config = ConfigParser ( ) section = 'pgdocgen' try : config . read ( settings [ 'configfile' ] ) except Exception as e : sys . stderr . write ( 'Failed to read config: ' + str ( e ) ) sys . exit ( 1 ) for option in config . options ( section ) : settings [ option ] = config . get ( section , option ) return settings
Load settings from configfile