From 97d7c9014855449fe04162308feac66a35e007ea Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 8 Aug 2011 00:11:01 +0200 Subject: Initial commit. app.py - WSGI application and handlers. config.py - Config helper class. directory.py - Directory and file helper classes. events.py - zeromq event publisher and subscriber. recode.py - Codecs and stuff static/ - Web interface --- config.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 config.py (limited to 'config.py') diff --git a/config.py b/config.py new file mode 100644 index 0000000..88826cb --- /dev/null +++ b/config.py @@ -0,0 +1,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() -- cgit v1.2.3