Fill a single paragraph of text, returning a new string. Reformat the single paragraph in 'text' to fit in lines of no more than 'width' columns, and return a new string containing the entire wrapped paragraph. As with wrap(), tabs are expanded and other whitespace characters conve
(text, width=70, **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. |
| 388 | |
| 389 | Reformat the single paragraph in 'text' to fit in lines of no more |
| 390 | than 'width' columns, and return a new string containing the entire |
| 391 | wrapped paragraph. As with wrap(), tabs are expanded and other |
| 392 | whitespace characters converted to space. See TextWrapper class for |
| 393 | available keyword args to customize wrapping behaviour. |
| 394 | """ |
| 395 | w = TextWrapper(width=width, **kwargs) |
| 396 | return w.fill(text) |
| 397 | |
| 398 | def shorten(text, width, **kwargs): |
| 399 | """Collapse and truncate the given text to fit in the given width. |
searching dependent graphs…