how to generate html table from "table" data?

Ricardo Aráoz ricaraoz at gmail.com
Thu Dec 27 07:28:39 EST 2007


Bruno Desthuilliers wrote:
> petr.jakes.tpc at gmail.com a écrit :
>  > Vasudev Ram wrote:
>>> Why not try writing your own code for this first?
>>> If nothing else, it'll help you learn more, and may also help you
>>> understand better, the other options.
>>>
>> Thanks for your reply even it was not really helpful.
> 
> The answers boil down to:
> - use the templating engine that comes with your web framework
> or
> - use whatever templating engine you like
> or
> - just do it by hand
> 
> The remaining work is obviously such a no-brainer that there's no need 
> for a specific package, and so application specific that there's 
> probably nothing like a one-size-fits-all answer. IOW : you're not 
> likely to find more "helpful" answer - and your above comment won't 
> help. FWIW, I just wrote a function generating an html table from a list 
> of header and a list of rows. I wrote the most Q&D, straightforward, 
> braindead way, it's 17 lines long, doesn't even need an import 
> statement, and took me less than 2 minutes to write - that is, far less 
> work than reading your post and answering it.

Hi.
Bruno, could you please post those 17 lines? I'm not actually doing HTML
work but I would find it interesting going through your code.

TIA






More information about the Python-list mailing list