l.s.m.m.MailWrapper : class documentation

Part of lp.services.mail.mailwrapper View In Hierarchy

Wraps text that should be included in an email.

Note that MailWrapper doesn't guarantee that all lines will be less than :width:, sometimes it's better not to break long lines in emails. See textformatting.txt for more information.

Unknown Field: widthhow long should the lines be
Unknown Field: indentspecifies how much indentation the lines should have
Unknown Field: indent_first_lineindicates whether the first line should be indented or not.
Method __init__ Undocumented
Method format Format the text to be included in an email.
def __init__(self, width=72, indent='', indent_first_line=True):
Undocumented
def format(self, text, force_wrap=False, wrap_func=None):
Format the text to be included in an email.
Parametersforce_wrapWhen False (the default), only paragraphs containing a single line will be wrapped. Otherwise paragraphs in text will be re-wrapped. (type: bool)
wrap_funcA function to call at the beginning of each paragraph to be wrapped. If the function returns False, the paragraph is not wrapped. (type: callable or None)
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.