You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by ru...@apache.org on 2004/04/02 20:21:13 UTC

cvs commit: gump/python/gump config.py

rubys       2004/04/02 10:21:13

  Modified:    python/gump config.py
  Log:
  Provide some insight into the configuration without requiring a
  successful execution of Gump (which depends on the configuration).
  
  Revision  Changes    Path
  1.18      +11 -0     gump/python/gump/config.py
  
  Index: config.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/config.py,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- config.py	19 Mar 2004 23:11:46 -0000	1.17
  +++ config.py	2 Apr 2004 18:21:13 -0000	1.18
  @@ -110,3 +110,14 @@
   
       if dir.base not in sys.path: sys.path.insert(0, dir.base)
   
  +
  +if __name__ == '__main__':
  +  def dump(section):
  +    print
  +    print "---", str(section).split('.')[-1], "---"
  +    for attr in __builtins__.dir(section):
  +      if attr == '__module__': continue
  +      print " ", attr + ":\t" + getattr(section, attr).__repr__()
  +
  +  for section in sys.argv[1:] or ('dir','default','setting','switch'):
  +    dump(locals()[section])
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org