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. |
Constant | FORCED_WIDTH |
Undocumented |
Function | iter_rows |
Undocumented |
Function | join_options |
No summary |
Function | measure_table |
Undocumented |
Function | wrap_text |
No summary |
Undocumented
Parameters | |
rows:t.Iterable[ | Undocumented |
col_count:int | Undocumented |
Returns | |
t.Iterator[ | Undocumented |
Parameters | |
options:t.Sequence[ | Undocumented |
Returns | |
t.Tuple[ | Undocumented |
Undocumented
Parameters | |
rows:t.Iterable[ | Undocumented |
Returns | |
t.Tuple[ | Undocumented |
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.
Parameters | |
text:str | the text that should be rewrapped. |
width:int | the maximum width for the text. |
initial_indent:str | the initial indent that should be placed on the first line as a string. |
subsequent_indent:str | the indent string that should be placed on each consecutive line. |
preserve_paragraphs:bool | if this flag is set then the wrapping will intelligently handle paragraphs. |
Returns | |
str | Undocumented |