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 white
(text, width=70, **kwargs)
| 371 | # -- Convenience interface --------------------------------------------- |
| 372 | |
| 373 | def wrap(text, width=70, **kwargs): |
| 374 | """Wrap a single paragraph of text, returning a list of wrapped lines. |
| 375 | |
| 376 | Reformat the single paragraph in 'text' so it fits in lines of no |
| 377 | more than 'width' columns, and return a list of wrapped lines. By |
| 378 | default, tabs in 'text' are expanded with string.expandtabs(), and |
| 379 | all other whitespace characters (including newline) are converted to |
| 380 | space. See TextWrapper class for available keyword args to customize |
| 381 | wrapping behaviour. |
| 382 | """ |
| 383 | w = TextWrapper(width=width, **kwargs) |
| 384 | return w.wrap(text) |
| 385 | |
| 386 | def fill(text, width=70, **kwargs): |
| 387 | """Fill a single paragraph of text, returning a new string. |
searching dependent graphs…