Irit Katriel <iritkatr...@yahoo.com> added the comment:
You can do this already with the break_long_words arg of testwrap: >>> import itertools, textwrap >>> wr = textwrap.wrap >>> list(itertools.chain(*(wr(x, 5) for x in wr("123 123 1234567", width=5, >>> break_long_words=False)))) ['123', '123', '12345', '67'] ---------- nosy: +iritkatriel _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue26214> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com