[Tutor] Splitting long lines correctly
Prahlad Vaidyanathan
slime@vsnl.net
Tue, 30 Jul 2002 09:15:56 +0530
Hi,
I am trying to write a script to paginate text files, and make them
"pretty" enough to print - something like "pr", only in Python.
Now, the main problem I am facing is splitting long (> 80 chars)
lines into smaller lines, while still preserving the readability.
ie. I do not want lines with a comma at the first column - instead I
would like to bring down the previous word onto the next line.
Also, I would like to be able to recognise and preserve paragraph
breaks, etc.
How do I go about achieving this ? Are there programs that already
do this (in Python) ?
pv.
--
Prahlad Vaidyanathan <http://www.symonds.net/~prahladv/>
Do not use that foreign word "ideals". We have that excellent native
word "lies".
-- Henrik Ibsen, "The Wild Duck"