I have noticed that you do not use native Python wrapping function in
xterm.py. Is there any specific reason?
It's just a suggestion but You could do something similar to:
content = file.read() #suppose that text is read from file
paragraph_list = content.split("\n") #split it to paragraphs
content_list = []
for paragraph in paragraph_list:
if not paragraph: #to handle empty new lines
content_list1.append(" ")
else:
content_list.extend(textwrap.wrap(paragraph)) #split
paragraphs and put them again to the list
wrapped_content = "\n\r".join(content_list1) #make string back but
with new line endings
Original issue reported on code.google.com by mich.mierzwa@gmail.com on 5 Feb 2010 at 3:05
Original issue reported on code.google.com by
mich.mierzwa@gmail.com
on 5 Feb 2010 at 3:05