I have a dictionary and you want to create an html page where a simple html table with keys and values will be drawn. How can this be done from python code?
output = "<html><body><table>" for key in your_dict: output += "<tr><td>%s</td><td>%s</td></tr>" % (key, your_dict[key]) output += "</table></body></html> print output
You can use a template engine like Jinja . A list of template engines is available here .
, , . http://markup.sourceforge.net/
Mako.
Python, Template. , ( ) .