I have a long string which I would like to break into pieces, of max X characters. BUT, only at a space (if some word in the string is longer than X chars, just put it into its own piece).
I don't even know how to begin to do this ... Pythonically
pseudo code:
declare a list
while still some string left:
take the fist X chars of the string
find the last space in that
write everything before the space to a new list entry
delete everything to the left of the space
Before I code that up, is there some python module that can help me (I don't think that pprint can)?