On Wed, 2008-12-17 at 01:47 -0500, R. Drew Davis wrote:
which specifically explains how to use the Python library HTMLgen to generate an HTML table.
HTMLgen is probably obsolete (though I still have some code using it).
ElementTree supports building XML (XHTML) an element at a time like HTMLgen.
Look at Python templating packages. I'm using Kid/Genshi, but you may prefer some of the alternatives. Django uses a different package for HTML templating.