On 8/24/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Vincent Gulinao wrote:
> >
> > Anyone knows a neat way of displaying output in columnar/tabular form?
>
> You might like this recipe:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/267662
>
> 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!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
http://corepython.com
wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor