/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
common::Args Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes

 parser
 args

Detailed Description

Usage::

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

Definition at line 56 of file common.py.


Constructor & Destructor Documentation

def common::Args::__init__ (   self,
  doc,
  kwa 
)

Definition at line 65 of file common.py.

00066                                   :
00067         parser =  argparse.ArgumentParser(description=doc, formatter_class=argparse.RawDescriptionHelpFormatter)
00068         parser.add_argument( '-l', '--level',     default="INFO" ,      help='Logging level. Default %(default)s ')
00069         parser.add_argument("--table",      default="DcsAdWpHv", help="Name of table to shunt. Default %(default)s ")
00070         parser.add_argument("--payidcol",   default="locationId", help="Payload column name serving as identity, eg locationId. Default %(default)s ")
00071         parser.add_argument("--limit",      default=-1, type=int, help="-1 for no limit, otherwise restrict transform for fast testing. Default %(default)s ")
00072         self.parser = parser


Member Function Documentation

def common::Args::__call__ (   self)

Definition at line 73 of file common.py.

00074                       :
00075         args = self.parser.parse_args()
00076         self.args = args
00077         logging.basicConfig(level=getattr(logging,args.level.upper()))
00078         log.info( "args %s " % pformat(vars(args)) )
00079         return args


Member Data Documentation

Definition at line 65 of file common.py.

Definition at line 73 of file common.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:50:03 for Scraper by doxygen 1.7.4