/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes
DybDbi::tools::Args Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes

 parser
 args

Detailed Description

Usage::

     from tools import Args
     a = Args(__doc__)
     a.parser.add_argument(..   ## between instanciation and the call can add further arguments 
     args = a()
 

Definition at line 10 of file tools.py.


Constructor & Destructor Documentation

def DybDbi::tools::Args::__init__ (   self,
  doc,
  kwa 
)

Definition at line 20 of file tools.py.

00021                                   :
00022         parser =  argparse.ArgumentParser(description=doc, formatter_class=argparse.RawDescriptionHelpFormatter)
00023         parser.add_argument( '-l', '--level',     default="INFO" ,      help='Logging level. Default %(default)s ')
00024         self.parser = parser


Member Function Documentation

def DybDbi::tools::Args::__call__ (   self)

Definition at line 25 of file tools.py.

00026                       :
00027         args = self.parser.parse_args()
00028         self.args = args
00029         logging.basicConfig(level=getattr(logging,args.level.upper()))
00030         log.info( "args %s " % pformat(vars(args)) )
00031         return args
00032 


Member Data Documentation

Definition at line 20 of file tools.py.

Definition at line 25 of file tools.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:57:25 for DybDbi by doxygen 1.7.4