[issue1859] textwrap doesn't linebreak on "\n"
Serhiy Storchaka
report at bugs.python.org
Sat Jul 28 08:51:36 CEST 2012
Serhiy Storchaka <storchaka at gmail.com> added the comment:
def wrap_paragraphs(text, width=70, **kwargs):
return [line for para in text.splitlines() for line in textwrap.wrap(para, width, **kwargs) or ['']]
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1859>
_______________________________________
More information about the Python-bugs-list
mailing list