Python module to format text into columns?
Aahz Maruch
aahz at netcom.com
Tue Nov 16 11:55:55 EST 1999
In article <80rcj3$n23$1 at nnrp1.deja.com>, <hamish_lawson at yahoo.co.uk> wrote:
>
>but I'm inclined to provide (at least initially) just the direct
>methods:
>
> formatter.setcolumn(column=1, margin=4, width=16, align=left)
> formatter.setcolumn(column=2, margin=2, width=4, align=left)
> formatter.setcolumn(column=3, margin=2, width=6, align=right)
Instead of explicitly naming the columns, I'd suggest passing in a list
of dicts (dicts so that you can set global defaults). That means that
for three columns all taking in the global defaults, you'd pass in
formatter.setcolumns ( [ {}, {}, {} ] )
--
--- Aahz (@netcom.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6 (if you want to know, do some research)
More information about the Python-list
mailing list