how to creating html files with python

Diez B. Roggisch deets at nospam.web.de
Sat Oct 27 12:19:52 EDT 2007


krishnakant Mane schrieb:
> hello,
> I have one strange requirement,
> I need to create html files through python and add some data from the database.
> it is a GUI based application developed in WX python.
> and the reports need to come out in html for some strange reason which
> is off topic to discuss here.
> but the point is that how do I do it?
> should I create a normal file object and write the html with the data

Essentially, yes.

> into it or are there some modules to do it?


There are a bazillion templating systems out there. Beginning with 
python's own string interpolation, to

KID, genshi, Mako, tenjin, cheeta, ... <continue>

Search this NG for python templating engines, and you'd be overwhelmed 
by the answers.

Happy chosing your evil,

Diez



More information about the Python-list mailing list