if __name__ == '__main__':
    config = {}
exec(compile(open('example.conf').read(), 'example.conf', 'exec'), config)
print(config['value1'])
print(config['value5'])
Python configuration file: Any file format recommendation? INI format still appropriate? Seems quite old school