CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
argparse.HelpFormatter Class Reference
Inheritance diagram for argparse.HelpFormatter:
argparse.ArgumentDefaultsHelpFormatter argparse.ArgumentDefaultsHelpFormatter argparse.RawDescriptionHelpFormatter argparse.RawDescriptionHelpFormatter argparse.RawTextHelpFormatter argparse.RawTextHelpFormatter argparse.RawTextHelpFormatter argparse.RawTextHelpFormatter

Classes

class  _Section
 

Public Member Functions

def __init__
 
def __init__
 
def add_argument
 
def add_argument
 
def add_arguments
 
def add_arguments
 
def add_text
 
def add_text
 
def add_usage
 
def add_usage
 
def end_section
 
def end_section
 
def format_help
 
def format_help
 
def start_section
 
def start_section
 

Private Member Functions

def _add_item
 
def _add_item
 
def _dedent
 
def _dedent
 
def _expand_help
 
def _expand_help
 
def _fill_text
 
def _fill_text
 
def _format_action
 
def _format_action
 
def _format_action_invocation
 
def _format_action_invocation
 
def _format_actions_usage
 
def _format_actions_usage
 
def _format_args
 
def _format_args
 
def _format_text
 
def _format_text
 
def _format_usage
 
def _format_usage
 
def _get_help_string
 
def _get_help_string
 
def _indent
 
def _indent
 
def _iter_indented_subactions
 
def _iter_indented_subactions
 
def _join_parts
 
def _join_parts
 
def _metavar_formatter
 
def _metavar_formatter
 
def _split_lines
 
def _split_lines
 

Private Attributes

 _action_max_length
 
 _current_indent
 
 _current_section
 
 _indent_increment
 
 _level
 
 _long_break_matcher
 
 _max_help_position
 
 _prog
 
 _root_section
 
 _whitespace_matcher
 
 _width
 

Detailed Description

Formatter for generating usage messages and argument help strings.

Only the name of this class is considered a public API. All the methods
provided by the class are considered an implementation detail.

Definition at line 147 of file argparse.py.

Constructor & Destructor Documentation

def argparse.HelpFormatter.__init__ (   self,
  prog,
  indent_increment = 2,
  max_help_position = 24,
  width = None 
)

Definition at line 158 of file argparse.py.

159  width=None):
160 
161  # default setting for width
162  if width is None:
163  try:
164  width = int(_os.environ['COLUMNS'])
165  except (KeyError, ValueError):
166  width = 80
167  width -= 2
169  self._prog = prog
170  self._indent_increment = indent_increment
171  self._max_help_position = max_help_position
172  self._width = width
175  self._level = 0
176  self._action_max_length = 0
178  self._root_section = self._Section(self, None)
179  self._current_section = self._root_section
181  self._whitespace_matcher = _re.compile(r'\s+')
182  self._long_break_matcher = _re.compile(r'\n\n\n+')
def argparse.HelpFormatter.__init__ (   self,
  prog,
  indent_increment = 2,
  max_help_position = 24,
  width = None 
)

Definition at line 188 of file argparse.py.

References argparse.HelpFormatter._action_max_length, argparse.HelpFormatter._current_indent, argparse.HelpFormatter._current_section, argparse.HelpFormatter._indent_increment, PGeometricDet::Item._level, TrackerGeometryCompare._level, MuonGeometryArrange._level, argparse.HelpFormatter._level, argparse.HelpFormatter._long_break_matcher, argparse.HelpFormatter._max_help_position, argparse.HelpFormatter._prog, argparse.HelpFormatter._root_section, argparse.HelpFormatter._whitespace_matcher, Vispa.Main.RotatingIcon.RotatingIcon._width, Vispa.Gui.VispaWidget.TextField._width, and argparse.HelpFormatter._width.

189  width=None):
190 
191  # default setting for width
192  if width is None:
193  try:
194  width = int(_os.environ['COLUMNS'])
195  except (KeyError, ValueError):
196  width = 80
197  width -= 2
198 
199  self._prog = prog
200  self._indent_increment = indent_increment
201  self._max_help_position = max_help_position
202  self._width = width
203 
204  self._current_indent = 0
205  self._level = 0
206  self._action_max_length = 0
207 
208  self._root_section = self._Section(self, None)
209  self._current_section = self._root_section
210 
211  self._whitespace_matcher = _re.compile(r'\s+')
212  self._long_break_matcher = _re.compile(r'\n\n\n+')

Member Function Documentation

def argparse.HelpFormatter._add_item (   self,
  func,
  args 
)
private

Definition at line 228 of file argparse.py.

Referenced by argparse.HelpFormatter._add_item(), argparse.HelpFormatter.add_argument(), python.rootplot.argparse.HelpFormatter.add_argument(), argparse.HelpFormatter.add_text(), python.rootplot.argparse.HelpFormatter.add_text(), argparse.HelpFormatter.add_usage(), python.rootplot.argparse.HelpFormatter.add_usage(), argparse.HelpFormatter.start_section(), and python.rootplot.argparse.HelpFormatter.start_section().

229  def _add_item(self, func, args):
230  self._current_section.items.append((func, args))
def argparse.HelpFormatter._add_item (   self,
  func,
  args 
)
private

Definition at line 258 of file argparse.py.

References argparse.HelpFormatter._add_item().

259  def _add_item(self, func, args):
260  self._current_section.items.append((func, args))
def argparse.HelpFormatter._dedent (   self)
private

Definition at line 190 of file argparse.py.

References argparse.HelpFormatter._current_indent, argparse.HelpFormatter._indent_increment, PGeometricDet::Item._level, TrackerGeometryCompare._level, MuonGeometryArrange._level, and argparse.HelpFormatter._level.

Referenced by argparse.HelpFormatter._dedent(), argparse.HelpFormatter._iter_indented_subactions(), python.rootplot.argparse.HelpFormatter._iter_indented_subactions(), argparse.HelpFormatter.end_section(), and python.rootplot.argparse.HelpFormatter.end_section().

191  def _dedent(self):
193  assert self._current_indent >= 0, 'Indent decreased below 0.'
194  self._level -= 1
def argparse.HelpFormatter._dedent (   self)
private

Definition at line 220 of file argparse.py.

References argparse.HelpFormatter._current_indent, argparse.HelpFormatter._dedent(), argparse.HelpFormatter._indent_increment, PGeometricDet::Item._level, TrackerGeometryCompare._level, MuonGeometryArrange._level, argparse.HelpFormatter._level, and dbtoconf.object.

221  def _dedent(self):
223  assert self._current_indent >= 0, 'Indent decreased below 0.'
224  self._level -= 1
def argparse.HelpFormatter._expand_help (   self,
  action 
)
private

Definition at line 590 of file argparse.py.

References argparse.HelpFormatter._get_help_string(), argparse.HelpFormatter._prog, python.multivaluedict.dict, join(), and list().

Referenced by argparse.HelpFormatter._expand_help(), argparse.HelpFormatter._format_action(), and python.rootplot.argparse.HelpFormatter._format_action().

591  def _expand_help(self, action):
592  params = dict(vars(action), prog=self._prog)
593  for name in list(params):
594  if params[name] is SUPPRESS:
595  del params[name]
596  for name in list(params):
597  if hasattr(params[name], '__name__'):
598  params[name] = params[name].__name__
599  if params.get('choices') is not None:
600  choices_str = ', '.join([str(c) for c in params['choices']])
601  params['choices'] = choices_str
602  return self._get_help_string(action) % params
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def argparse.HelpFormatter._expand_help (   self,
  action 
)
private

Definition at line 610 of file argparse.py.

References argparse.HelpFormatter._expand_help(), argparse.HelpFormatter._get_help_string(), argparse.HelpFormatter._prog, python.multivaluedict.dict, join(), and list().

611  def _expand_help(self, action):
612  params = dict(vars(action), prog=self._prog)
613  for name in list(params):
614  if params[name] is SUPPRESS:
615  del params[name]
616  if params.get('choices') is not None:
617  choices_str = ', '.join([str(c) for c in params['choices']])
618  params['choices'] = choices_str
619  return self._get_help_string(action) % params
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def argparse.HelpFormatter._fill_text (   self,
  text,
  width,
  indent 
)
private

Definition at line 618 of file argparse.py.

Referenced by argparse.HelpFormatter._fill_text(), argparse.HelpFormatter._format_text(), and python.rootplot.argparse.HelpFormatter._format_text().

619  def _fill_text(self, text, width, indent):
620  text = self._whitespace_matcher.sub(' ', text).strip()
621  return _textwrap.fill(text, width, initial_indent=indent,
622  subsequent_indent=indent)
def argparse.HelpFormatter._fill_text (   self,
  text,
  width,
  indent 
)
private

Definition at line 635 of file argparse.py.

References argparse.HelpFormatter._fill_text().

636  def _fill_text(self, text, width, indent):
637  text = self._whitespace_matcher.sub(' ', text).strip()
638  return _textwrap.fill(text, width, initial_indent=indent,
639  subsequent_indent=indent)
def argparse.HelpFormatter._format_action (   self,
  action 
)
private

Definition at line 485 of file argparse.py.

References argparse.HelpFormatter._action_max_length, argparse.HelpFormatter._current_indent, argparse.HelpFormatter._expand_help(), argparse.HelpFormatter._format_action(), argparse.HelpFormatter._format_action_invocation(), argparse.HelpFormatter._iter_indented_subactions(), argparse.HelpFormatter._join_parts(), argparse.HelpFormatter._max_help_position, argparse.HelpFormatter._split_lines(), Vispa.Main.RotatingIcon.RotatingIcon._width, Vispa.Gui.VispaWidget.TextField._width, argparse.HelpFormatter._width, and min.

Referenced by argparse.HelpFormatter._format_action(), python.rootplot.argparse.HelpFormatter._format_action(), argparse.HelpFormatter.add_argument(), and python.rootplot.argparse.HelpFormatter.add_argument().

486  def _format_action(self, action):
487  # determine the required width and the entry label
488  help_position = min(self._action_max_length + 2,
489  self._max_help_position)
490  help_width = self._width - help_position
491  action_width = help_position - self._current_indent - 2
492  action_header = self._format_action_invocation(action)
493 
494  # ho nelp; start on same line and add a final newline
495  if not action.help:
496  tup = self._current_indent, '', action_header
497  action_header = '%*s%s\n' % tup
498 
499  # short action name; start on the same line and pad two spaces
500  elif len(action_header) <= action_width:
501  tup = self._current_indent, '', action_width, action_header
502  action_header = '%*s%-*s ' % tup
503  indent_first = 0
504 
505  # long action name; start on the next line
506  else:
507  tup = self._current_indent, '', action_header
508  action_header = '%*s%s\n' % tup
509  indent_first = help_position
510 
511  # collect the pieces of the action help
512  parts = [action_header]
513 
514  # if there was help for the action, add lines of help text
515  if action.help:
516  help_text = self._expand_help(action)
517  help_lines = self._split_lines(help_text, help_width)
518  parts.append('%*s%s\n' % (indent_first, '', help_lines[0]))
519  for line in help_lines[1:]:
520  parts.append('%*s%s\n' % (help_position, '', line))
521 
522  # or add a newline if the description doesn't end with one
523  elif not action_header.endswith('\n'):
524  parts.append('\n')
525 
526  # if there are any sub-actions, add their help as well
527  for subaction in self._iter_indented_subactions(action):
528  parts.append(self._format_action(subaction))
529 
530  # return a single string
531  return self._join_parts(parts)
#define min(a, b)
Definition: mlp_lapack.h:161
def argparse.HelpFormatter._format_action (   self,
  action 
)
private

Definition at line 507 of file argparse.py.

References argparse.HelpFormatter._action_max_length, argparse.HelpFormatter._current_indent, argparse.HelpFormatter._expand_help(), argparse.HelpFormatter._format_action(), argparse.HelpFormatter._format_action_invocation(), argparse.HelpFormatter._iter_indented_subactions(), argparse.HelpFormatter._join_parts(), argparse.HelpFormatter._max_help_position, argparse.HelpFormatter._split_lines(), Vispa.Main.RotatingIcon.RotatingIcon._width, Vispa.Gui.VispaWidget.TextField._width, argparse.HelpFormatter._width, and min.

508  def _format_action(self, action):
509  # determine the required width and the entry label
510  help_position = min(self._action_max_length + 2,
511  self._max_help_position)
512  help_width = self._width - help_position
513  action_width = help_position - self._current_indent - 2
514  action_header = self._format_action_invocation(action)
515 
516  # ho nelp; start on same line and add a final newline
517  if not action.help:
518  tup = self._current_indent, '', action_header
519  action_header = '%*s%s\n' % tup
520 
521  # short action name; start on the same line and pad two spaces
522  elif len(action_header) <= action_width:
523  tup = self._current_indent, '', action_width, action_header
524  action_header = '%*s%-*s ' % tup
525  indent_first = 0
526 
527  # long action name; start on the next line
528  else:
529  tup = self._current_indent, '', action_header
530  action_header = '%*s%s\n' % tup
531  indent_first = help_position
532 
533  # collect the pieces of the action help
534  parts = [action_header]
535 
536  # if there was help for the action, add lines of help text
537  if action.help:
538  help_text = self._expand_help(action)
539  help_lines = self._split_lines(help_text, help_width)
540  parts.append('%*s%s\n' % (indent_first, '', help_lines[0]))
541  for line in help_lines[1:]:
542  parts.append('%*s%s\n' % (help_position, '', line))
543 
544  # or add a newline if the description doesn't end with one
545  elif not action_header.endswith('\n'):
546  parts.append('\n')
547 
548  # if there are any sub-actions, add their help as well
549  for subaction in self._iter_indented_subactions(action):
550  parts.append(self._format_action(subaction))
551 
552  # return a single string
553  return self._join_parts(parts)
#define min(a, b)
Definition: mlp_lapack.h:161
def argparse.HelpFormatter._format_action_invocation (   self,
  action 
)
private

Definition at line 532 of file argparse.py.

References argparse.HelpFormatter._format_args(), argparse.HelpFormatter._metavar_formatter(), and join().

Referenced by argparse.HelpFormatter._format_action(), python.rootplot.argparse.HelpFormatter._format_action(), argparse.HelpFormatter._format_action_invocation(), argparse.HelpFormatter.add_argument(), and python.rootplot.argparse.HelpFormatter.add_argument().

533  def _format_action_invocation(self, action):
534  if not action.option_strings:
535  metavar, = self._metavar_formatter(action, action.dest)(1)
536  return metavar
537 
538  else:
539  parts = []
540 
541  # if the Optional doesn't take a value, format is:
542  # -s, --long
543  if action.nargs == 0:
544  parts.extend(action.option_strings)
545 
546  # if the Optional takes a value, format is:
547  # -s ARGS, --long ARGS
548  else:
549  default = action.dest.upper()
550  args_string = self._format_args(action, default)
551  for option_string in action.option_strings:
552  parts.append('%s %s' % (option_string, args_string))
553 
554  return ', '.join(parts)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._format_action_invocation (   self,
  action 
)
private

Definition at line 554 of file argparse.py.

References argparse.HelpFormatter._format_action_invocation(), argparse.HelpFormatter._format_args(), argparse.HelpFormatter._metavar_formatter(), and join().

555  def _format_action_invocation(self, action):
556  if not action.option_strings:
557  metavar, = self._metavar_formatter(action, action.dest)(1)
558  return metavar
559 
560  else:
561  parts = []
562 
563  # if the Optional doesn't take a value, format is:
564  # -s, --long
565  if action.nargs == 0:
566  parts.extend(action.option_strings)
567 
568  # if the Optional takes a value, format is:
569  # -s ARGS, --long ARGS
570  else:
571  default = action.dest.upper()
572  args_string = self._format_args(action, default)
573  for option_string in action.option_strings:
574  parts.append('%s %s' % (option_string, args_string))
575 
576  return ', '.join(parts)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._format_actions_usage (   self,
  actions,
  groups 
)
private

Definition at line 382 of file argparse.py.

References argparse.HelpFormatter._format_args(), and join().

Referenced by argparse.HelpFormatter._format_actions_usage(), argparse.HelpFormatter._format_usage(), and python.rootplot.argparse.HelpFormatter._format_usage().

383  def _format_actions_usage(self, actions, groups):
384  # find group indices and identify actions in groups
385  group_actions = set()
386  inserts = {}
387  for group in groups:
388  try:
389  start = actions.index(group._group_actions[0])
390  except ValueError:
391  continue
392  else:
393  end = start + len(group._group_actions)
394  if actions[start:end] == group._group_actions:
395  for action in group._group_actions:
396  group_actions.add(action)
397  if not group.required:
398  if start in inserts:
399  inserts[start] += ' ['
400  else:
401  inserts[start] = '['
402  inserts[end] = ']'
403  else:
404  if start in inserts:
405  inserts[start] += ' ('
406  else:
407  inserts[start] = '('
408  inserts[end] = ')'
409  for i in range(start + 1, end):
410  inserts[i] = '|'
411 
412  # collect all actions format strings
413  parts = []
414  for i, action in enumerate(actions):
415 
416  # suppressed arguments are marked with None
417  # remove | separators for suppressed arguments
418  if action.help is SUPPRESS:
419  parts.append(None)
420  if inserts.get(i) == '|':
421  inserts.pop(i)
422  elif inserts.get(i + 1) == '|':
423  inserts.pop(i + 1)
424 
425  # produce all arg strings
426  elif not action.option_strings:
427  part = self._format_args(action, action.dest)
428 
429  # if it's in a group, strip the outer []
430  if action in group_actions:
431  if part[0] == '[' and part[-1] == ']':
432  part = part[1:-1]
433 
434  # add the action string to the list
435  parts.append(part)
436 
437  # produce the first way to invoke the option in brackets
438  else:
439  option_string = action.option_strings[0]
440 
441  # if the Optional doesn't take a value, format is:
442  # -s or --long
443  if action.nargs == 0:
444  part = '%s' % option_string
445 
446  # if the Optional takes a value, format is:
447  # -s ARGS or --long ARGS
448  else:
449  default = action.dest.upper()
450  args_string = self._format_args(action, default)
451  part = '%s %s' % (option_string, args_string)
452 
453  # make it look optional if it's not required or in a group
454  if not action.required and action not in group_actions:
455  part = '[%s]' % part
456 
457  # add the action string to the list
458  parts.append(part)
459 
460  # insert things at the necessary indices
461  for i in sorted(inserts, reverse=True):
462  parts[i:i] = [inserts[i]]
463 
464  # join all the action items with spaces
465  text = ' '.join([item for item in parts if item is not None])
466 
467  # clean up separators for mutually exclusive groups
468  open = r'[\[(]'
469  close = r'[\])]'
470  text = _re.sub(r'(%s) ' % open, r'\1', text)
471  text = _re.sub(r' (%s)' % close, r'\1', text)
472  text = _re.sub(r'%s *%s' % (open, close), r'', text)
473  text = _re.sub(r'\(([^|]*)\)', r'\1', text)
474  text = text.strip()
475 
476  # return the text
477  return text
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._format_actions_usage (   self,
  actions,
  groups 
)
private

Definition at line 412 of file argparse.py.

References argparse.HelpFormatter._format_actions_usage(), argparse.HelpFormatter._format_args(), argparse._set, argparse._sorted, and join().

413  def _format_actions_usage(self, actions, groups):
414  # find group indices and identify actions in groups
415  group_actions = _set()
416  inserts = {}
417  for group in groups:
418  try:
419  start = actions.index(group._group_actions[0])
420  except ValueError:
421  continue
422  else:
423  end = start + len(group._group_actions)
424  if actions[start:end] == group._group_actions:
425  for action in group._group_actions:
426  group_actions.add(action)
427  if not group.required:
428  inserts[start] = '['
429  inserts[end] = ']'
430  else:
431  inserts[start] = '('
432  inserts[end] = ')'
433  for i in range(start + 1, end):
434  inserts[i] = '|'
435 
436  # collect all actions format strings
437  parts = []
438  for i, action in enumerate(actions):
439 
440  # suppressed arguments are marked with None
441  # remove | separators for suppressed arguments
442  if action.help is SUPPRESS:
443  parts.append(None)
444  if inserts.get(i) == '|':
445  inserts.pop(i)
446  elif inserts.get(i + 1) == '|':
447  inserts.pop(i + 1)
448 
449  # produce all arg strings
450  elif not action.option_strings:
451  part = self._format_args(action, action.dest)
452 
453  # if it's in a group, strip the outer []
454  if action in group_actions:
455  if part[0] == '[' and part[-1] == ']':
456  part = part[1:-1]
457 
458  # add the action string to the list
459  parts.append(part)
460 
461  # produce the first way to invoke the option in brackets
462  else:
463  option_string = action.option_strings[0]
464 
465  # if the Optional doesn't take a value, format is:
466  # -s or --long
467  if action.nargs == 0:
468  part = '%s' % option_string
469 
470  # if the Optional takes a value, format is:
471  # -s ARGS or --long ARGS
472  else:
473  default = action.dest.upper()
474  args_string = self._format_args(action, default)
475  part = '%s %s' % (option_string, args_string)
476 
477  # make it look optional if it's not required or in a group
478  if not action.required and action not in group_actions:
479  part = '[%s]' % part
480 
481  # add the action string to the list
482  parts.append(part)
483 
484  # insert things at the necessary indices
485  for i in _sorted(inserts, reverse=True):
486  parts[i:i] = [inserts[i]]
487 
488  # join all the action items with spaces
489  text = ' '.join([item for item in parts if item is not None])
490 
491  # clean up separators for mutually exclusive groups
492  open = r'[\[(]'
493  close = r'[\])]'
494  text = _re.sub(r'(%s) ' % open, r'\1', text)
495  text = _re.sub(r' (%s)' % close, r'\1', text)
496  text = _re.sub(r'%s *%s' % (open, close), r'', text)
497  text = _re.sub(r'\(([^|]*)\)', r'\1', text)
498  text = text.strip()
499 
500  # return the text
501  return text
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._format_args (   self,
  action,
  default_metavar 
)
private

Definition at line 571 of file argparse.py.

References argparse.HelpFormatter._metavar_formatter(), and join().

Referenced by argparse.HelpFormatter._format_action_invocation(), python.rootplot.argparse.HelpFormatter._format_action_invocation(), argparse.HelpFormatter._format_actions_usage(), python.rootplot.argparse.HelpFormatter._format_actions_usage(), and argparse.HelpFormatter._format_args().

572  def _format_args(self, action, default_metavar):
573  get_metavar = self._metavar_formatter(action, default_metavar)
574  if action.nargs is None:
575  result = '%s' % get_metavar(1)
576  elif action.nargs == OPTIONAL:
577  result = '[%s]' % get_metavar(1)
578  elif action.nargs == ZERO_OR_MORE:
579  result = '[%s [%s ...]]' % get_metavar(2)
580  elif action.nargs == ONE_OR_MORE:
581  result = '%s [%s ...]' % get_metavar(2)
582  elif action.nargs == REMAINDER:
583  result = '...'
584  elif action.nargs == PARSER:
585  result = '%s ...' % get_metavar(1)
586  else:
587  formats = ['%s' for _ in range(action.nargs)]
588  result = ' '.join(formats) % get_metavar(action.nargs)
589  return result
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._format_args (   self,
  action,
  default_metavar 
)
private

Definition at line 593 of file argparse.py.

References argparse.HelpFormatter._format_args(), argparse.HelpFormatter._metavar_formatter(), and join().

594  def _format_args(self, action, default_metavar):
595  get_metavar = self._metavar_formatter(action, default_metavar)
596  if action.nargs is None:
597  result = '%s' % get_metavar(1)
598  elif action.nargs == OPTIONAL:
599  result = '[%s]' % get_metavar(1)
600  elif action.nargs == ZERO_OR_MORE:
601  result = '[%s [%s ...]]' % get_metavar(2)
602  elif action.nargs == ONE_OR_MORE:
603  result = '%s [%s ...]' % get_metavar(2)
604  elif action.nargs is PARSER:
605  result = '%s ...' % get_metavar(1)
606  else:
607  formats = ['%s' for _ in range(action.nargs)]
608  result = ' '.join(formats) % get_metavar(action.nargs)
609  return result
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._format_text (   self,
  text 
)
private

Definition at line 478 of file argparse.py.

References argparse.HelpFormatter._current_indent, argparse.HelpFormatter._fill_text(), argparse.HelpFormatter._prog, Vispa.Main.RotatingIcon.RotatingIcon._width, Vispa.Gui.VispaWidget.TextField._width, argparse.HelpFormatter._width, and python.multivaluedict.dict.

Referenced by argparse.HelpFormatter._format_text(), argparse.HelpFormatter.add_text(), and python.rootplot.argparse.HelpFormatter.add_text().

479  def _format_text(self, text):
480  if '%(prog)' in text:
481  text = text % dict(prog=self._prog)
482  text_width = self._width - self._current_indent
483  indent = ' ' * self._current_indent
484  return self._fill_text(text, text_width, indent) + '\n\n'
def argparse.HelpFormatter._format_text (   self,
  text 
)
private

Definition at line 502 of file argparse.py.

References argparse.HelpFormatter._current_indent, argparse.HelpFormatter._fill_text(), argparse.HelpFormatter._format_text(), Vispa.Main.RotatingIcon.RotatingIcon._width, Vispa.Gui.VispaWidget.TextField._width, and argparse.HelpFormatter._width.

503  def _format_text(self, text):
504  text_width = self._width - self._current_indent
505  indent = ' ' * self._current_indent
506  return self._fill_text(text, text_width, indent) + '\n\n'
def argparse.HelpFormatter._format_usage (   self,
  usage,
  actions,
  groups,
  prefix 
)
private

Definition at line 290 of file argparse.py.

References argparse.HelpFormatter._current_indent, argparse.HelpFormatter._format_actions_usage(), argparse.HelpFormatter._prog, Vispa.Main.RotatingIcon.RotatingIcon._width, Vispa.Gui.VispaWidget.TextField._width, argparse.HelpFormatter._width, python.multivaluedict.dict, and join().

Referenced by argparse.HelpFormatter._format_usage(), argparse.HelpFormatter.add_usage(), and python.rootplot.argparse.HelpFormatter.add_usage().

291  def _format_usage(self, usage, actions, groups, prefix):
292  if prefix is None:
293  prefix = _('usage: ')
294 
295  # if usage is specified, use that
296  if usage is not None:
297  usage = usage % dict(prog=self._prog)
298 
299  # if no optionals or positionals are available, usage is just prog
300  elif usage is None and not actions:
301  usage = '%(prog)s' % dict(prog=self._prog)
302 
303  # if optionals and positionals are available, calculate usage
304  elif usage is None:
305  prog = '%(prog)s' % dict(prog=self._prog)
306 
307  # split optionals from positionals
308  optionals = []
309  positionals = []
310  for action in actions:
311  if action.option_strings:
312  optionals.append(action)
313  else:
314  positionals.append(action)
315 
316  # build full usage string
317  format = self._format_actions_usage
318  action_usage = format(optionals + positionals, groups)
319  usage = ' '.join([s for s in [prog, action_usage] if s])
320 
321  # wrap the usage parts if it's too long
322  text_width = self._width - self._current_indent
323  if len(prefix) + len(usage) > text_width:
324 
325  # break usage into wrappable parts
326  part_regexp = r'\(.*?\)+|\[.*?\]+|\S+'
327  opt_usage = format(optionals, groups)
328  pos_usage = format(positionals, groups)
329  opt_parts = _re.findall(part_regexp, opt_usage)
330  pos_parts = _re.findall(part_regexp, pos_usage)
331  assert ' '.join(opt_parts) == opt_usage
332  assert ' '.join(pos_parts) == pos_usage
333 
334  # helper for wrapping lines
335  def get_lines(parts, indent, prefix=None):
336  lines = []
337  line = []
338  if prefix is not None:
339  line_len = len(prefix) - 1
340  else:
341  line_len = len(indent) - 1
342  for part in parts:
343  if line_len + 1 + len(part) > text_width:
344  lines.append(indent + ' '.join(line))
345  line = []
346  line_len = len(indent) - 1
347  line.append(part)
348  line_len += len(part) + 1
349  if line:
350  lines.append(indent + ' '.join(line))
351  if prefix is not None:
352  lines[0] = lines[0][len(indent):]
353  return lines
354 
355  # if prog is short, follow it with optionals or positionals
356  if len(prefix) + len(prog) <= 0.75 * text_width:
357  indent = ' ' * (len(prefix) + len(prog) + 1)
358  if opt_parts:
359  lines = get_lines([prog] + opt_parts, indent, prefix)
360  lines.extend(get_lines(pos_parts, indent))
361  elif pos_parts:
362  lines = get_lines([prog] + pos_parts, indent, prefix)
363  else:
364  lines = [prog]
365 
366  # if prog is long, put it on its own line
367  else:
368  indent = ' ' * len(prefix)
369  parts = opt_parts + pos_parts
370  lines = get_lines(parts, indent)
371  if len(lines) > 1:
372  lines = []
373  lines.extend(get_lines(opt_parts, indent))
374  lines.extend(get_lines(pos_parts, indent))
375  lines = [prog] + lines
376 
377  # join lines into usage
378  usage = '\n'.join(lines)
379 
380  # prefix with 'usage:'
381  return '%s%s\n\n' % (prefix, usage)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._format_usage (   self,
  usage,
  actions,
  groups,
  prefix 
)
private

Definition at line 320 of file argparse.py.

References argparse.HelpFormatter._current_indent, argparse.HelpFormatter._format_actions_usage(), argparse.HelpFormatter._format_usage(), argparse.HelpFormatter._prog, Vispa.Main.RotatingIcon.RotatingIcon._width, Vispa.Gui.VispaWidget.TextField._width, argparse.HelpFormatter._width, python.multivaluedict.dict, and join().

321  def _format_usage(self, usage, actions, groups, prefix):
322  if prefix is None:
323  prefix = _('usage: ')
324 
325  # if usage is specified, use that
326  if usage is not None:
327  usage = usage % dict(prog=self._prog)
328 
329  # if no optionals or positionals are available, usage is just prog
330  elif usage is None and not actions:
331  usage = '%(prog)s' % dict(prog=self._prog)
332 
333  # if optionals and positionals are available, calculate usage
334  elif usage is None:
335  prog = '%(prog)s' % dict(prog=self._prog)
336 
337  # split optionals from positionals
338  optionals = []
339  positionals = []
340  for action in actions:
341  if action.option_strings:
342  optionals.append(action)
343  else:
344  positionals.append(action)
345 
346  # build full usage string
347  format = self._format_actions_usage
348  action_usage = format(optionals + positionals, groups)
349  usage = ' '.join([s for s in [prog, action_usage] if s])
350 
351  # wrap the usage parts if it's too long
352  text_width = self._width - self._current_indent
353  if len(prefix) + len(usage) > text_width:
354 
355  # break usage into wrappable parts
356  part_regexp = r'\(.*?\)+|\[.*?\]+|\S+'
357  opt_usage = format(optionals, groups)
358  pos_usage = format(positionals, groups)
359  opt_parts = _re.findall(part_regexp, opt_usage)
360  pos_parts = _re.findall(part_regexp, pos_usage)
361  assert ' '.join(opt_parts) == opt_usage
362  assert ' '.join(pos_parts) == pos_usage
363 
364  # helper for wrapping lines
365  def get_lines(parts, indent, prefix=None):
366  lines = []
367  line = []
368  if prefix is not None:
369  line_len = len(prefix) - 1
370  else:
371  line_len = len(indent) - 1
372  for part in parts:
373  if line_len + 1 + len(part) > text_width:
374  lines.append(indent + ' '.join(line))
375  line = []
376  line_len = len(indent) - 1
377  line.append(part)
378  line_len += len(part) + 1
379  if line:
380  lines.append(indent + ' '.join(line))
381  if prefix is not None:
382  lines[0] = lines[0][len(indent):]
383  return lines
384 
385  # if prog is short, follow it with optionals or positionals
386  if len(prefix) + len(prog) <= 0.75 * text_width:
387  indent = ' ' * (len(prefix) + len(prog) + 1)
388  if opt_parts:
389  lines = get_lines([prog] + opt_parts, indent, prefix)
390  lines.extend(get_lines(pos_parts, indent))
391  elif pos_parts:
392  lines = get_lines([prog] + pos_parts, indent, prefix)
393  else:
394  lines = [prog]
395 
396  # if prog is long, put it on its own line
397  else:
398  indent = ' ' * len(prefix)
399  parts = opt_parts + pos_parts
400  lines = get_lines(parts, indent)
401  if len(lines) > 1:
402  lines = []
403  lines.extend(get_lines(opt_parts, indent))
404  lines.extend(get_lines(pos_parts, indent))
405  lines = [prog] + lines
406 
407  # join lines into usage
408  usage = '\n'.join(lines)
409 
410  # prefix with 'usage:'
411  return '%s%s\n\n' % (prefix, usage)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._get_help_string (   self,
  action 
)
private

Definition at line 623 of file argparse.py.

Referenced by argparse.HelpFormatter._expand_help(), python.rootplot.argparse.HelpFormatter._expand_help(), and argparse.HelpFormatter._get_help_string().

624  def _get_help_string(self, action):
625  return action.help
626 
def argparse.HelpFormatter._get_help_string (   self,
  action 
)
private

Definition at line 640 of file argparse.py.

References argparse.HelpFormatter._get_help_string().

641  def _get_help_string(self, action):
642  return action.help
643 
def argparse.HelpFormatter._indent (   self)
private

Definition at line 186 of file argparse.py.

References argparse.HelpFormatter._current_indent, argparse.HelpFormatter._indent_increment, PGeometricDet::Item._level, TrackerGeometryCompare._level, MuonGeometryArrange._level, and argparse.HelpFormatter._level.

Referenced by argparse.HelpFormatter._indent(), argparse.HelpFormatter._iter_indented_subactions(), python.rootplot.argparse.HelpFormatter._iter_indented_subactions(), argparse.HelpFormatter.start_section(), and python.rootplot.argparse.HelpFormatter.start_section().

187  def _indent(self):
189  self._level += 1
def argparse.HelpFormatter._indent (   self)
private

Definition at line 216 of file argparse.py.

References argparse.HelpFormatter._current_indent, argparse.HelpFormatter._indent(), argparse.HelpFormatter._indent_increment, PGeometricDet::Item._level, TrackerGeometryCompare._level, MuonGeometryArrange._level, and argparse.HelpFormatter._level.

217  def _indent(self):
219  self._level += 1
def argparse.HelpFormatter._iter_indented_subactions (   self,
  action 
)
private

Definition at line 603 of file argparse.py.

References argparse.HelpFormatter._dedent(), and argparse.HelpFormatter._indent().

Referenced by argparse.HelpFormatter._format_action(), python.rootplot.argparse.HelpFormatter._format_action(), argparse.HelpFormatter._iter_indented_subactions(), argparse.HelpFormatter.add_argument(), and python.rootplot.argparse.HelpFormatter.add_argument().

604  def _iter_indented_subactions(self, action):
605  try:
606  get_subactions = action._get_subactions
607  except AttributeError:
608  pass
609  else:
610  self._indent()
611  for subaction in get_subactions():
612  yield subaction
613  self._dedent()
def argparse.HelpFormatter._iter_indented_subactions (   self,
  action 
)
private

Definition at line 620 of file argparse.py.

References argparse.HelpFormatter._dedent(), argparse.HelpFormatter._indent(), and argparse.HelpFormatter._iter_indented_subactions().

621  def _iter_indented_subactions(self, action):
622  try:
623  get_subactions = action._get_subactions
624  except AttributeError:
625  pass
626  else:
627  self._indent()
628  for subaction in get_subactions():
629  yield subaction
630  self._dedent()
def argparse.HelpFormatter._join_parts (   self,
  part_strings 
)
private

Definition at line 285 of file argparse.py.

References join().

Referenced by argparse.HelpFormatter._format_action(), python.rootplot.argparse.HelpFormatter._format_action(), and argparse.HelpFormatter._join_parts().

286  def _join_parts(self, part_strings):
287  return ''.join([part
288  for part in part_strings
289  if part and part is not SUPPRESS])
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._join_parts (   self,
  part_strings 
)
private

Definition at line 315 of file argparse.py.

References argparse.HelpFormatter._join_parts(), and join().

316  def _join_parts(self, part_strings):
317  return ''.join([part
318  for part in part_strings
319  if part and part is not SUPPRESS])
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._metavar_formatter (   self,
  action,
  default_metavar 
)
private

Definition at line 555 of file argparse.py.

References diffTreeTool.format(), and join().

Referenced by argparse.HelpFormatter._format_action_invocation(), python.rootplot.argparse.HelpFormatter._format_action_invocation(), argparse.HelpFormatter._format_args(), python.rootplot.argparse.HelpFormatter._format_args(), and argparse.HelpFormatter._metavar_formatter().

556  def _metavar_formatter(self, action, default_metavar):
557  if action.metavar is not None:
558  result = action.metavar
559  elif action.choices is not None:
560  choice_strs = [str(choice) for choice in action.choices]
561  result = '{%s}' % ','.join(choice_strs)
562  else:
563  result = default_metavar
564 
565  def format(tuple_size):
566  if isinstance(result, tuple):
567  return result
568  else:
569  return (result, ) * tuple_size
570  return format
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._metavar_formatter (   self,
  action,
  default_metavar 
)
private

Definition at line 577 of file argparse.py.

References argparse.HelpFormatter._metavar_formatter(), diffTreeTool.format(), and join().

578  def _metavar_formatter(self, action, default_metavar):
579  if action.metavar is not None:
580  result = action.metavar
581  elif action.choices is not None:
582  choice_strs = [str(choice) for choice in action.choices]
583  result = '{%s}' % ','.join(choice_strs)
584  else:
585  result = default_metavar
586 
587  def format(tuple_size):
588  if isinstance(result, tuple):
589  return result
590  else:
591  return (result, ) * tuple_size
592  return format
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse.HelpFormatter._split_lines (   self,
  text,
  width 
)
private

Definition at line 614 of file argparse.py.

Referenced by argparse.HelpFormatter._format_action(), python.rootplot.argparse.HelpFormatter._format_action(), and argparse.HelpFormatter._split_lines().

615  def _split_lines(self, text, width):
616  text = self._whitespace_matcher.sub(' ', text).strip()
617  return _textwrap.wrap(text, width)
def argparse.HelpFormatter._split_lines (   self,
  text,
  width 
)
private

Definition at line 631 of file argparse.py.

References argparse.HelpFormatter._split_lines().

632  def _split_lines(self, text, width):
633  text = self._whitespace_matcher.sub(' ', text).strip()
634  return _textwrap.wrap(text, width)
def argparse.HelpFormatter.add_argument (   self,
  action 
)

Definition at line 253 of file argparse.py.

References argparse.HelpFormatter._action_max_length, argparse.HelpFormatter._add_item(), argparse.HelpFormatter._current_indent, argparse.HelpFormatter._format_action(), argparse.HelpFormatter._format_action_invocation(), argparse.HelpFormatter._iter_indented_subactions(), and max().

Referenced by argparse.ArgumentParser.__init__(), argparse.HelpFormatter.add_argument(), argparse.HelpFormatter.add_arguments(), and python.rootplot.argparse.HelpFormatter.add_arguments().

254  def add_argument(self, action):
255  if action.help is not SUPPRESS:
256 
257  # find all invocations
258  get_invocation = self._format_action_invocation
259  invocations = [get_invocation(action)]
260  for subaction in self._iter_indented_subactions(action):
261  invocations.append(get_invocation(subaction))
262 
263  # update the maximum item length
264  invocation_length = max([len(s) for s in invocations])
265  action_length = invocation_length + self._current_indent
267  action_length)
268 
269  # add the item to the list
270  self._add_item(self._format_action, [action])
const T & max(const T &a, const T &b)
def argparse.HelpFormatter.add_argument (   self,
  action 
)

Definition at line 283 of file argparse.py.

References argparse.HelpFormatter._action_max_length, argparse.HelpFormatter._add_item(), argparse.HelpFormatter._current_indent, argparse.HelpFormatter._format_action(), argparse.HelpFormatter._format_action_invocation(), argparse.HelpFormatter._iter_indented_subactions(), argparse.HelpFormatter.add_argument(), and max().

284  def add_argument(self, action):
285  if action.help is not SUPPRESS:
286 
287  # find all invocations
288  get_invocation = self._format_action_invocation
289  invocations = [get_invocation(action)]
290  for subaction in self._iter_indented_subactions(action):
291  invocations.append(get_invocation(subaction))
292 
293  # update the maximum item length
294  invocation_length = max([len(s) for s in invocations])
295  action_length = invocation_length + self._current_indent
297  action_length)
298 
299  # add the item to the list
300  self._add_item(self._format_action, [action])
const T & max(const T &a, const T &b)
def argparse.HelpFormatter.add_arguments (   self,
  actions 
)

Definition at line 271 of file argparse.py.

References argparse.HelpFormatter.add_argument().

Referenced by argparse.HelpFormatter.add_arguments().

272  def add_arguments(self, actions):
273  for action in actions:
274  self.add_argument(action)
def argparse.HelpFormatter.add_arguments (   self,
  actions 
)

Definition at line 301 of file argparse.py.

References argparse.HelpFormatter.add_argument(), and argparse.HelpFormatter.add_arguments().

302  def add_arguments(self, actions):
303  for action in actions:
304  self.add_argument(action)
def argparse.HelpFormatter.add_text (   self,
  text 
)

Definition at line 244 of file argparse.py.

References argparse.HelpFormatter._add_item(), and argparse.HelpFormatter._format_text().

Referenced by argparse.HelpFormatter.add_text().

245  def add_text(self, text):
246  if text is not SUPPRESS and text is not None:
247  self._add_item(self._format_text, [text])
def argparse.HelpFormatter.add_text (   self,
  text 
)

Definition at line 274 of file argparse.py.

References argparse.HelpFormatter._add_item(), argparse.HelpFormatter._format_text(), and argparse.HelpFormatter.add_text().

275  def add_text(self, text):
276  if text is not SUPPRESS and text is not None:
277  self._add_item(self._format_text, [text])
def argparse.HelpFormatter.add_usage (   self,
  usage,
  actions,
  groups,
  prefix = None 
)

Definition at line 248 of file argparse.py.

References argparse.HelpFormatter._add_item(), and argparse.HelpFormatter._format_usage().

Referenced by argparse.HelpFormatter.add_usage().

249  def add_usage(self, usage, actions, groups, prefix=None):
250  if usage is not SUPPRESS:
251  args = usage, actions, groups, prefix
252  self._add_item(self._format_usage, args)
def argparse.HelpFormatter.add_usage (   self,
  usage,
  actions,
  groups,
  prefix = None 
)

Definition at line 278 of file argparse.py.

References argparse.HelpFormatter._add_item(), argparse.HelpFormatter._format_usage(), and argparse.HelpFormatter.add_usage().

279  def add_usage(self, usage, actions, groups, prefix=None):
280  if usage is not SUPPRESS:
281  args = usage, actions, groups, prefix
282  self._add_item(self._format_usage, args)
def argparse.HelpFormatter.end_section (   self)

Definition at line 240 of file argparse.py.

References argparse.HelpFormatter._current_section, and argparse.HelpFormatter._dedent().

Referenced by argparse.HelpFormatter.end_section().

241  def end_section(self):
242  self._current_section = self._current_section.parent
243  self._dedent()
def argparse.HelpFormatter.end_section (   self)

Definition at line 270 of file argparse.py.

References argparse.HelpFormatter._current_section, argparse.HelpFormatter._dedent(), and argparse.HelpFormatter.end_section().

271  def end_section(self):
272  self._current_section = self._current_section.parent
273  self._dedent()
def argparse.HelpFormatter.format_help (   self)

Definition at line 278 of file argparse.py.

Referenced by argparse.HelpFormatter.format_help(), argparse.ArgumentParser.print_help(), and python.rootplot.argparse.ArgumentParser.print_help().

279  def format_help(self):
280  help = self._root_section.format_help()
281  if help:
282  help = self._long_break_matcher.sub('\n\n', help)
283  help = help.strip('\n') + '\n'
284  return help
def argparse.HelpFormatter.format_help (   self)

Definition at line 308 of file argparse.py.

References argparse.HelpFormatter.format_help().

309  def format_help(self):
310  help = self._root_section.format_help()
311  if help:
312  help = self._long_break_matcher.sub('\n\n', help)
313  help = help.strip('\n') + '\n'
314  return help
def argparse.HelpFormatter.start_section (   self,
  heading 
)

Definition at line 234 of file argparse.py.

References argparse.HelpFormatter._add_item(), argparse.HelpFormatter._current_section, and argparse.HelpFormatter._indent().

Referenced by argparse.HelpFormatter.start_section().

235  def start_section(self, heading):
236  self._indent()
237  section = self._Section(self, self._current_section, heading)
238  self._add_item(section.format_help, [])
239  self._current_section = section
def argparse.HelpFormatter.start_section (   self,
  heading 
)

Definition at line 264 of file argparse.py.

References argparse.HelpFormatter._add_item(), argparse.HelpFormatter._current_section, argparse.HelpFormatter._indent(), and argparse.HelpFormatter.start_section().

265  def start_section(self, heading):
266  self._indent()
267  section = self._Section(self, self._current_section, heading)
268  self._add_item(section.format_help, [])
269  self._current_section = section

Member Data Documentation

argparse.HelpFormatter._action_max_length
private

Definition at line 175 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__(), argparse.HelpFormatter._format_action(), python.rootplot.argparse.HelpFormatter._format_action(), argparse.HelpFormatter.add_argument(), and python.rootplot.argparse.HelpFormatter.add_argument().

argparse.HelpFormatter._current_indent
private

Definition at line 173 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__(), argparse.HelpFormatter._dedent(), python.rootplot.argparse.HelpFormatter._dedent(), argparse.HelpFormatter._format_action(), python.rootplot.argparse.HelpFormatter._format_action(), argparse.HelpFormatter._format_text(), python.rootplot.argparse.HelpFormatter._format_text(), argparse.HelpFormatter._format_usage(), python.rootplot.argparse.HelpFormatter._format_usage(), argparse.HelpFormatter._indent(), python.rootplot.argparse.HelpFormatter._indent(), argparse.HelpFormatter.add_argument(), and python.rootplot.argparse.HelpFormatter.add_argument().

argparse.HelpFormatter._current_section
private

Definition at line 178 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__(), argparse.HelpFormatter.end_section(), python.rootplot.argparse.HelpFormatter.end_section(), argparse.HelpFormatter.start_section(), and python.rootplot.argparse.HelpFormatter.start_section().

argparse.HelpFormatter._indent_increment
private

Definition at line 169 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__(), argparse.HelpFormatter._dedent(), python.rootplot.argparse.HelpFormatter._dedent(), argparse.HelpFormatter._indent(), and python.rootplot.argparse.HelpFormatter._indent().

argparse.HelpFormatter._level
private

Definition at line 174 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__(), argparse.HelpFormatter._dedent(), python.rootplot.argparse.HelpFormatter._dedent(), argparse.HelpFormatter._indent(), and python.rootplot.argparse.HelpFormatter._indent().

argparse.HelpFormatter._long_break_matcher
private

Definition at line 181 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__().

argparse.HelpFormatter._max_help_position
private

Definition at line 170 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__(), argparse.HelpFormatter._format_action(), and python.rootplot.argparse.HelpFormatter._format_action().

argparse.HelpFormatter._prog
private

Definition at line 168 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__(), argparse.HelpFormatter._expand_help(), python.rootplot.argparse.HelpFormatter._expand_help(), argparse.HelpFormatter._format_text(), python.rootplot.argparse.HelpFormatter._format_text(), argparse.HelpFormatter._format_usage(), and python.rootplot.argparse.HelpFormatter._format_usage().

argparse.HelpFormatter._root_section
private

Definition at line 177 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__().

argparse.HelpFormatter._whitespace_matcher
private

Definition at line 180 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__().

argparse.HelpFormatter._width
private

Definition at line 171 of file argparse.py.

Referenced by argparse.HelpFormatter.__init__(), argparse.HelpFormatter._format_action(), python.rootplot.argparse.HelpFormatter._format_action(), argparse.HelpFormatter._format_text(), python.rootplot.argparse.HelpFormatter._format_text(), argparse.HelpFormatter._format_usage(), and python.rootplot.argparse.HelpFormatter._format_usage().