Beispiel #1
0
def main( args ):
    argSpec =   [
                    ( 'level',     'l', 'level',      True,  True,  False, "Level to connect to" ),
                    ( 'schema',    's', 'schema',     True,  True,  False, "Schema owner name" ),
                    ( 'output',    'o', 'output',     True,  True,  False, "Output file to write to" ),
                    ( 'verbose',   'v', 'verbose',    False, False, False, "Verbose mode" )
                ]
    
    parser = commandline.Parser(args[0], argSpec)
    
    matchedArgs, unmatchedArgs = parser.parse(args[1:])
    
    level   = matchedArgs[ 'level'  ]
    schema  = matchedArgs[ 'schema' ]
    output  = matchedArgs[ 'output' ]
    
    verbose = 'verbose' in matchedArgs
    
    LogHelper.setLevel( log, verbose )
    
    conschema = get_schema_connection( level )
    
    process( conschema, schema.upper(), open( output, 'w' ) )
def main(args):
    argSpec = [
        ('level', 'l', 'level', True, True, False, "Level to connect to"),
        ('schema', 's', 'schema', True, True, False, "Schema owner name"),
        ('output', 'o', 'output', True, True, False,
         "Output file to write to"),
        ('verbose', 'v', 'verbose', False, False, False, "Verbose mode")
    ]

    parser = commandline.Parser(args[0], argSpec)

    matchedArgs, unmatchedArgs = parser.parse(args[1:])

    level = matchedArgs['level']
    schema = matchedArgs['schema']
    output = matchedArgs['output']

    verbose = 'verbose' in matchedArgs

    LogHelper.setLevel(log, verbose)

    conschema = get_schema_connection(level)

    process(conschema, schema.upper(), open(output, 'w'))
Beispiel #3
0
def setLevel( level ):
    LogHelper.setLevel( log, level )