]> git.donarmstrong.com Git - neurodebian.git/commitdiff
Simple tools to query the ND config.
authorMichael Hanke <michael.hanke@gmail.com>
Thu, 23 Sep 2010 01:01:30 +0000 (21:01 -0400)
committerMichael Hanke <michael.hanke@gmail.com>
Thu, 23 Sep 2010 01:01:30 +0000 (21:01 -0400)
tools/nd_querycfg [new file with mode: 0755]

diff --git a/tools/nd_querycfg b/tools/nd_querycfg
new file mode 100755 (executable)
index 0000000..9e73f55
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+#
+# Dead simple script to query the NeuroDebian dev config.
+#
+import sys
+from ConfigParser import SafeConfigParser
+
+# XXX add check if it is there at all
+# XXX support more locations
+cfg_path="/etc/neurodebian/neurodebian.cfg"
+
+cfg = SafeConfigParser()
+cfg.read(cfg_path)
+print cfg.get(sys.argv[1], sys.argv[2])