On 23/03/2010 10:48, Johny wrote:
I have a text and would like to split the text into smaller parts, say into 100 characters each. But if the 100th character is not a blank ( but word) this must be less than 100 character.That means the word itself can not be split. These smaller parts must contains only whole( not split) words. I was thinking about RegEx but do not know how to find the correct Regular Expression. Can anyone help? Thanks L.
Have a look at the textwrap module TJG -- http://mail.python.org/mailman/listinfo/python-list