CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Private Member Functions
extend_argparse.HelpFormatterRespectNewlines Class Reference
Inheritance diagram for extend_argparse.HelpFormatterRespectNewlines:

Private Member Functions

def _split_lines
 

Detailed Description

Help message formatter which retains line breaks in argument descriptions.

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 5 of file extend_argparse.py.

Member Function Documentation

def extend_argparse.HelpFormatterRespectNewlines._split_lines (   self,
  text,
  width 
)
private

Definition at line 12 of file extend_argparse.py.

References strip().

Referenced by python.rootplot.argparse.HelpFormatter._format_action().

12 
13  def _split_lines(self, text, width):
14  lines = []
15  for line in text.splitlines():
16  line = self._whitespace_matcher.sub(' ', line).strip()
17  lines.extend( _textwrap.wrap(line, width) )
18  return lines
19 
# argparse's formatters are not really able to discover the terminale size, so we override them
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16