Belle II Software  release-08-01-10
ArgumentParser Class Reference
Inheritance diagram for ArgumentParser:
Collaboration diagram for ArgumentParser:

Public Member Functions

def error (self, message)
 

Detailed Description

An argparse.Argument parse slightly changed such
that it always prints an extended help message incase of a parsing error.

Definition at line 18 of file utilities.py.

Member Function Documentation

◆ error()

def error (   self,
  message 
)
Method invoked when a parsing error occured.
Writes an extended help over the base ArgumentParser.

Definition at line 23 of file utilities.py.

23  def error(self, message):
24  """Method invoked when a parsing error occured.
25  Writes an extended help over the base ArgumentParser.
26  """
27  self.print_help()
28  sys.stderr.write('error: %s\n' % message)
29  sys.exit(2)
30 
31 

The documentation for this class was generated from the following file: