CMS 3D CMS Logo

Private Member Functions

extend_argparse::HelpFormatterRespectNewlines Class Reference

List of all members.

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.

00013                                        :
00014         lines = []
00015         for line in text.splitlines():
00016           line = self._whitespace_matcher.sub(' ', line).strip()
00017           lines.extend( _textwrap.wrap(line, width) )
00018         return lines
00019 
# argparse's formatters are not really able to discover the terminale size, so we override them