On 01 June 2002, Tim Peters said:
[Greg Ward, on wrapping text]
...
Note that regrtest.py also has a wrapper:
def printlist(x, width=70, indent=4): """Print the elements of a sequence to stdout.
Optional arg width (default 70) is the maximum line length. Optional arg indent (default 4) is the number of blanks with which to begin each line. """
I think this one will probably stand; I've gotten to the point with my text-wrapping code where I'm reimplementing the various other text-wrappers people have mentioned on top of it, and regrtest.printlist() is just not a good fit. It's for printing lists compactly, not for filling text. Whatever.
Just make sure it handle the union of all possible desires, but has a simple and intuitive interface <wink>.
Right. Gotcha. Code coming up soon. Greg -- Greg Ward - Unix weenie gward@python.net http://starship.python.net/~gward/ Quick!! Act as if nothing has happened!