class InventoryTextWrapper(width=70, initial_indent='', subsequent_indent='', expand_tabs=True, replace_whitespace=True, fix_sentence_endings=False, break_long_words=True, drop_whitespace=True, break_on_hyphens=True, tabsize=8, *, max_lines=None, placeholder=' [...]')[source]

Bases: textwrap.TextWrapper


__module__ str(object=’‘) -> str
__weakref__ list of weak references to the object (if defined)
sentence_end_re Compiled regular expression objects
unicode_whitespace_trans dict() -> new empty dictionary
uspace int(x=0) -> integer
wordsep_re Compiled regular expression objects
wordsep_simple_re Compiled regular expression objects
x str(object=’‘) -> str

Public Methods

fill Reformat the single paragraph in ‘text’ to fit in lines of no
wrap Reformat the single paragraph in ‘text’ so it fits in lines of no more than ‘self.width’ columns, and return a list of wrapped lines.

Private Methods


Private methods are mainly for internal/developer use and their API might change without notice.

_fix_sentence_endings Correct for sentence endings buried in ‘chunks’.
_handle_long_word _handle_long_word(chunks : [string],
_munge_whitespace Munge whitespace in text: expand tabs and convert all other whitespace characters to spaces.
_split Split the text to wrap into indivisible chunks.

Special Methods

__dir__ default dir() implementation
__format__ default object formatter
__new__ Create and return a new object.
__reduce__ helper for pickle
__reduce_ex__ helper for pickle
__sizeof__ size of object in memory, in bytes
__subclasshook__ Abstract classes can override this to customize issubclass().