diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-08 00:11:01 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-08 00:11:01 +0200 |
commit | 97d7c9014855449fe04162308feac66a35e007ea (patch) | |
tree | 8133c59cb0f066d992f434109818dd771e73f544 /config.py |
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
Diffstat (limited to 'config.py')
-rw-r--r-- | config.py | 19 |
1 files changed, 19 insertions, 0 deletions
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() |