1''' config.cfg
2[whatever]
3key=qwerertyertywert2345
4secret=sadfgwertgrtujdfgh
5'''
6
7from configparser import ConfigParser
8
9config = ConfigParser()
10config.read('config.cfg')
11
12my_key = config['whatever']['key']
13my_secret = config['whatever']['secret']
1from ConfigParser import SafeConfigParser
2
3parser = SafeConfigParser()
4parser.read('simple.ini')
5
6print parser.get('bug_tracker', 'url')
7