summaryrefslogtreecommitdiffstats
path: root/Reaktor/IRC/getconf.py
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-08-28 11:05:44 +0200
committermakefu <github@syntax-fehler.de>2015-08-28 11:05:44 +0200
commitf2dd476172dedcc788332cbceb853cc0615ba6ff (patch)
treee5644b21e1d87a74b09afb436d779272476f5589 /Reaktor/IRC/getconf.py
parent31dd24af3e6721d1763b85ace640517024de39f2 (diff)
Reaktor: IRC -> reaktor
Remove Obsolete README, remove obsolete index
Diffstat (limited to 'Reaktor/IRC/getconf.py')
-rw-r--r--Reaktor/IRC/getconf.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/Reaktor/IRC/getconf.py b/Reaktor/IRC/getconf.py
deleted file mode 100644
index 168c908c..00000000
--- a/Reaktor/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)
-