[Tutor] Generating simple HTML from within Python

Duncan Gibson duncan at thermal.esa.int
Thu May 10 18:25:08 CEST 2007


I'm updating an application at the moment that generates simple HTML
files. However, it's all done using plain strings and brute force.
It's hard to read, and isn't very robust in the face of special
characters and matching start and end tags.

I've been searching for a module to allow simple HTML generation, but
most of them appear to be more concerned with *parsing* HTML and XML.
The only one that looks promising from reviews dating back to 1998 or
so is HTMLgen, but the link on starship.python.net appears long dead.

So my question is, what is the preferred way of generating simple HTML
or XHTML files these days? Is there a 'son of HTMLgen' or similar module?

Cheers
Duncan

PS. Apologies if this shows up twice. My first post seems to be MIA.


More information about the Tutor mailing list