Utils Module

Utils for usage / help text formatters

author:

Doug Skrypa

cli_command_parser.formatting.utils.format_help_entry(usage_parts: Iterable[str], description: OptStrs, prefix: str = '', tw_offset: int = 0, *, lpad: int = 2, cont_indent: int = 2, usage_delim: str = ', ') str[source]
cli_command_parser.formatting.utils.combine_and_wrap(parts: Iterable[str], max_width: int, cont_indent: int = 0, delim: str = ', ') Iterator[str][source]

Combine the given strings using the given delimiter, wrapping to a new line at max_width.

cli_command_parser.formatting.utils.line_iter(*columns: Strs) Iterator[list[str, ...]][source]

More complicated than what would be necessary for just 2 columns, but this will scale to handle 3+