2010-07-27 03:15:15 +08:00
|
|
|
from py.xml import html
|
2008-08-16 23:26:59 +08:00
|
|
|
|
|
|
|
paras = "First Para", "Second para"
|
|
|
|
|
|
|
|
doc = html.html(
|
|
|
|
html.head(
|
2010-07-27 03:15:15 +08:00
|
|
|
html.meta(name="Content-Type", value="text/html; charset=latin1")),
|
2008-08-16 23:26:59 +08:00
|
|
|
html.body(
|
|
|
|
[html.p(p) for p in paras]))
|
|
|
|
|
|
|
|
print unicode(doc).encode('latin1')
|
|
|
|
|
|
|
|
|