MCPcopy Create free account
hub / github.com/Kitware/VTK / parseCmdLine

Function parseCmdLine

Wrapping/Python/vtkmodules/test/Testing.py:504–526  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

502
503
504def parseCmdLine():
505 arguments = sys.argv[1:]
506
507 options = "B:D:T:V:v:hnI"
508 long_options = ['baseline-root=', 'data-dir=', 'temp-dir=',
509 'validated-output=', 'verbose=', 'help',
510 'no-image', 'interact']
511
512 try:
513 # getopt expects options to be first
514 first = 0
515 for i, arg in enumerate(arguments):
516 if arg.startswith('-'):
517 first = i
518 break
519 opts, args = getopt.getopt(arguments[first:], options, long_options)
520 except getopt.error as msg:
521 print(usage())
522 print('-'*70)
523 print(msg)
524 sys.exit (1)
525
526 return opts, args
527
528
529def processCmdLine():

Callers 1

processCmdLineFunction · 0.85

Calls 4

enumerateFunction · 0.85
usageFunction · 0.70
printFunction · 0.50
exitMethod · 0.45

Tested by

no test coverage detected