[Tutor] Displaying in columnar / tabular form
wescpy at gmail.com
Thu Aug 24 20:05:09 CEST 2006
On 8/24/06, Kent Johnson <kent37 at tds.net> wrote:
> Vincent Gulinao wrote:
> > Anyone knows a neat way of displaying output in columnar/tabular form?
> You might like this recipe:
> Another option is to write an HTML file containing a table.
the recipe that kent suggested seems really fully-featured. for
simpler applications where i just want "to do it myself," i would use
the same string methods that the recipe's code uses: center(),
ljust(), and rjust().
another alternative for external columnar alighment, in addition to
kent's HTML suggestion is to just write it directly into an Excel
spreadsheet (via Win32 libraries) or alternatively, generate a CSV
file that Excel can import.
hope this helps!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
More information about the Tutor