[Tutor] Generating simple HTML from within Python
Mike.Hansen at atmel.com
Thu May 10 20:42:12 CEST 2007
> -----Original Message-----
> From: tutor-bounces at python.org
> [mailto:tutor-bounces at python.org] On Behalf Of Duncan Gibson
> Sent: Thursday, May 10, 2007 10:25 AM
> To: tutor at python.org
> Subject: [Tutor] Generating simple HTML from within Python
> 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?
> PS. Apologies if this shows up twice. My first post seems to be MIA.
Did you search the Cheese Shop. I did a search for "html generator", and
there's a few couple of modules mike html 0.4.0 and markup.py 1.6.1 that
look like they might do the trick.
More information about the Tutor