module documentation

Undocumented

Class HelpFormatter This class helps with formatting text-based help pages. It's usually just needed for very special internal cases, but it's also exposed so that developers can write their own fancy outputs.
Function iter_rows Undocumented
Function join_options Given a list of option strings this joins them in the most appropriate way and returns them in the form ``(formatted_string, any_prefix_is_slash)`` where the second item in the tuple is a flag that indicates if any of the option prefixes was a slash.
Function measure_table Undocumented
Function wrap_text A helper function that intelligently wraps text. By default, it assumes that it operates on a single paragraph of text but if the `preserve_paragraphs` parameter is provided it will intelligently handle paragraphs (defined by two empty lines).
Constant FORCED_WIDTH Undocumented
def iter_rows(rows, col_count): (source)

Undocumented

Parameters
rows:t.Iterable[t.Tuple[str, str]]Undocumented
col_count:intUndocumented
Returns
t.Iterator[t.Tuple[str, ...]]Undocumented
def join_options(options): (source)

Given a list of option strings this joins them in the most appropriate way and returns them in the form ``(formatted_string, any_prefix_is_slash)`` where the second item in the tuple is a flag that indicates if any of the option prefixes was a slash.

Parameters
options:t.Sequence[str]Undocumented
Returns
t.Tuple[str, bool]Undocumented
def measure_table(rows): (source)

Undocumented

Parameters
rows:t.Iterable[t.Tuple[str, str]]Undocumented
Returns
t.Tuple[int, ...]Undocumented
def wrap_text(text, width=78, initial_indent='', subsequent_indent='', preserve_paragraphs=False): (source)

A helper function that intelligently wraps text. By default, it assumes that it operates on a single paragraph of text but if the `preserve_paragraphs` parameter is provided it will intelligently handle paragraphs (defined by two empty lines). If paragraphs are handled, a paragraph can be prefixed with an empty line containing the ``\b`` character (``\x08``) to indicate that no rewrapping should happen in that block. :param text: the text that should be rewrapped. :param width: the maximum width for the text. :param initial_indent: the initial indent that should be placed on the first line as a string. :param subsequent_indent: the indent string that should be placed on each consecutive line. :param preserve_paragraphs: if this flag is set then the wrapping will intelligently handle paragraphs.

Parameters
text:strUndocumented
width:intUndocumented
initial_indent:strUndocumented
subsequent_indent:strUndocumented
preserve_paragraphs:boolUndocumented
Returns
strUndocumented
FORCED_WIDTH: t.Optional[int] = (source)

Undocumented

Value
None