| 293 |
| 294 |
| 295 |
| 296 |
| 297 |
| 298 |
| 299 |
| 300 |
| 301 |
| 302 |
| 303 |
| 304 | |
def wrap(text, width=70, **kwargs): |
"""Wrap a single paragraph of text, returning a list of wrapped lines. |
|
Reformat the single paragraph in 'text' so it fits in lines of no |
more than 'width' columns, and return a list of wrapped lines. By |
default, tabs in 'text' are expanded with string.expandtabs(), and |
all other whitespace characters (including newline) are converted to |
space. See TextWrapper class for available keyword args to customize |
wrapping behaviour. |
""" |
w = TextWrapper(width=width, **kwargs) |
return w.wrap(text) | |