简单的html模板生成代码
#template auto genetate
template = '''
<html>
<head>
<title>%(title)s</title>
</head>
<body>
<h1>%(title)s</h1>
<p>%(text)s</p>
</body>
</html>'''
data = {'title':'My Home Page','text':'Welcome to my Home Page'}
print template % data
python version 2.4.3