so how do *you* generate XHTML?

Paul Boddie paul at boddie.net
Fri Jan 17 06:02:47 EST 2003


"N. Thomas" <nthomas at cise.ufl.edu> wrote in message news:<slrnb26aej.1hr.nthomas at rain.cise.ufl.edu>...
> I've got some data that I'd like Python to spit out into XHTML, and I
> don't want to print out raw XHTML strings, ala (print '<title>%s</title>
> % body['title']).

No, that would bring up a number of encoding issues vaguely
reminiscent of the all-too-frequently-asked database quoting
questions.

> After looking around a bit, the only module I can find that can do this
> is HTMLgen, which was exactly what I was looking for.

[...]

> My question: Is there a newer version of HTMLgen or is there a newer
> tool that does the same thing as HTMLgen?

Well, I tend to use the PyXML tools and the various serialisation
classes and functions such as xml.dom.ext.PrettyPrint. However, from
this and your other recent posting, it might appear that use of the
PyXML technologies are somewhat excessive (and inappropriate) for your
needs. I do recall seeing a few packages on the Vaults of Parnassus -
try searching for HTML there when the database search becomes
available again.

Paul




More information about the Python-list mailing list