aboutsummaryrefslogtreecommitdiffstats
path: root/IRC/getconf.py
diff options
context:
space:
mode:
Diffstat (limited to 'IRC/getconf.py')
-rw-r--r--IRC/getconf.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/IRC/getconf.py b/IRC/getconf.py
deleted file mode 100644
index 168c908..0000000
--- a/IRC/getconf.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#getconf = make_getconf("dateiname.json")
-#getconf(key) -> value
-#oder error
-
-import imp
-import os
-
-
-def make_getconf(filename):
-
-
- def getconf(prop, default_value=None):
- prop_split = prop.split('.')
- string = ''
- config = load_config(filename)
- #imp.reload(config)
- tmp = config.__dict__
- for pr in prop_split:
- if pr in tmp:
- tmp = tmp[pr]
- else:
- return default_value
- return tmp
-
- return getconf
-
-
-def load_config(filename):
- dirname = os.path.dirname(filename)
- modname, ext = os.path.splitext(os.path.basename(filename))
- file, pathname, description = imp.find_module(modname, [ dirname ])
- return imp.load_module(modname, file, pathname, description)
-