blob: e6f3d608c6a1d1facfeb410743aa9bcf1f7237fa [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
3from planetstack.config import Config
4
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()