blob: 66f48f8d90d9726b67902477f31524e8393fad9e [file] [log] [blame]
S.Çağlar Onur3e92b4d2015-02-09 13:34:11 -05001#!/usr/bin/env python
Scott Bakerd14ffa42014-05-15 15:29:47 -07002import sys
Scott Baker86e132c2015-02-11 21:38:09 -08003from xos.config import Config
Scott Bakerd14ffa42014-05-15 15:29:47 -07004
5def help():
6 print "syntax: %s get name [default]" % sys.argv[0]
7
8def main():
9 c = Config()
10
11 if len(sys.argv)<=1:
12 help()
13 return
14
15 if sys.argv[1] == "get":
16 if len(sys.argv)==4:
17 print getattr(c, sys.argv[2], sys.argv[3])
18 elif len(sys.argv)==3:
19 print getattr(c, sys.argv[2])
20 else:
21 help()
22 else:
23 help()
24
25main()