New submission from Tyler Romeo :
Python's textwrap module can be helpful at times, but personally I think there
are a couple of things that could be added.
First, when it comes to text wrapping, usually you're not dealing with a
monospace font where each letter is the same size.
Tyler Romeo added the comment:
Nah, they're both unrelated. I'll separate the changes and remake the patches.
(I'll keep this entry for the beautification part.)
--
___
Python tracker
<http://bugs.pyt
Tyler Romeo added the comment:
OK, so here is the patch for just the new algorithm.
--
Added file:
http://bugs.python.org/file22573/textwrap.py-new-algorithm-2011-07-04_22-45-53_r71219+.diff
___
Python tracker
<http://bugs.python.org/issue12
New submission from Tyler Romeo :
Originally from http://bugs.python.org/issue12485 but separated.
The textwrap modules uses len to determine the length of text, but in many (if
not most) fonts, the width of a character differs depending on the letter, so
it would be useful to have an option
Changes by Tyler Romeo :
Removed file: http://bugs.python.org/file22561/textwrap.py-improvement.diff
___
Python tracker
<http://bugs.python.org/issue12485>
___
___
Pytho
Tyler Romeo added the comment:
Normally I would have just added it as a function to be overloaded, but because
of the nature of the textwrap.wrap function (all kwargs are passed to the
TextWrapper constructor) I thought it made a lot more sense to keep it as an
argument to __init__
Tyler Romeo added the comment:
OK, sorry to get back so late, but here's the updated patch without xrange. I
saw the version change but forgot that I used xrange in the function (old
habits I guess).
--
Added file:
http://bugs.python.org/file22626/textwrap.py-beautiful-2011-07-
Changes by Tyler Romeo :
Removed file:
http://bugs.python.org/file22573/textwrap.py-new-algorithm-2011-07-04_22-45-53_r71219+.diff
___
Python tracker
<http://bugs.python.org/issue12