summaryrefslogtreecommitdiff
path: root/config.py
blob: 88826cb49c4c05afec1e6e257954324fad83087b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
try:
	from configparser import ConfigParser
except ImportError:
	from ConfigParser import ConfigParser

class Config(object):
	def __init__(self, filename = 'config'):
		self.config_section = 'foo'

		self.config = ConfigParser()
		self.config.read(filename)

	def get(self, key):
		return self.config.get(self.config_section, key)

	def getint(self, key):
		return self.config.getint(self.config_section, key)

config = Config()