You are viewing an older version (5.14.3). Go to latest (5.15.0)
{ } Raw JSON

bundles / traitlets 5.14.3 / traitlets / utils / text / wrap_paragraphs

function

traitlets.utils.text:wrap_paragraphs

source: /traitlets/utils/text.py :17

Signature

def   wrap_paragraphs ( text : str ncols : int = 80 )  →  List[str]

Summary

Wrap multiple paragraphs to fit a specified width.

Extended Summary

This is equivalent to textwrap.wrap, but with support for multiple paragraphs, as separated by empty lines.

Returns

: list of complete paragraphs, wrapped to fill `ncols` columns.

Aliases

  • traitlets.config.wrap_paragraphs