def parseArgs(argv=sys.argv):
 global verbosity, debug
 try:
  (options, args) = getopt.getopt(argv[1:], 'hHvqd', ['help', 'verbose', 'quiet', 'debug'])
  for (opt, value) in options:
   if (opt in ('-h', '-H', '--help')):
    usageExit()
   if (opt in ('-q', '--quiet')):
    verbosity = 0
   if (opt in ('-v', '--verbose')):
    verbosity = 2
   if (opt in ('-d', '--debug')):
    debug = 1
  if (len(args) != 0):
   usageExit('No command-line arguments supported yet.')
 except getopt.error as msg:
  usageExit(msg)

def parseArgs ( argv = sys . argv ) : global verbosity , debug try : ( options , args ) = getopt . getopt ( argv [ 1 : ] , 'hHvqd' , [ 'help' , 'verbose' , 'quiet' , 'debug' ] ) for ( opt , value ) in options : if ( opt in ( '-h' , '-H' , '--help' ) ) : usageExit ( ) if ( opt in ( '-q' , '--quiet' ) ) : verbosity = 0 if ( opt in ( '-v' , '--verbose' ) ) : verbosity = 2 if ( opt in ( '-d' , '--debug' ) ) : debug = 1 if ( len ( args ) != 0 ) : usageExit ( 'No command-line arguments supported yet.' ) except getopt . error as msg : usageExit ( msg )
parse command line arguments and set testframework state .