do replacement evenly

Scott David Daniels Scott.Daniels at Acm.Org
Tue Jun 2 15:55:48 CEST 2009


oyster wrote:
> I have some strings, and I want to write them into a text files, one
> string one line
> but there is a requirement: every line has a max length of a certain
> number ... <description of re-padding a line>

If you are doing this to fill and justify text, I seem to remember
a research result stating that filled text (with smooth left and right
margins) works well for proportional fonts, but decreases readability
for fixed pitch fonts, where ragged right (or ragged left) works better.
Sadly, I have no idea where I read that as it is only in the recesses
of my somewhat addled brain.

--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list