From: Michael Hanke Date: Thu, 23 Sep 2010 01:01:30 +0000 (-0400) Subject: Simple tools to query the ND config. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=852a143c9b6e213f0579d4ede0010d6b5db4ac68;p=neurodebian.git Simple tools to query the ND config. --- diff --git a/tools/nd_querycfg b/tools/nd_querycfg new file mode 100755 index 0000000..9e73f55 --- /dev/null +++ b/tools/nd_querycfg @@ -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])