erramentas de escrita @XML para Python

Atualmente, estou tentando o ElementTree e parece bom, escapa às entidades HTML e assim por diante. Estou sentindo falta de algo verdadeiramente maravilhoso do qual nunca ouvi falar?

Isso é semelhante ao que estou fazendo:

import xml.etree.ElementTree as ET
root = ET.Element('html')
head = ET.SubElement(root,'head')
script = ET.SubElement(head,'script')
script.set('type','text/javascript')
script.text = "var a = 'I love á letters'"
body = ET.SubElement(root,'body')
h1 = ET.SubElement(body,'h1')
h1.text = "And I like the fact that 3 > 1"
tree = ET.ElementTree(root)
tree.write('foo.xhtml')

# more foo.xhtml
<html><head><script type="text/javascript">var a = 'I love &amp;aacute;
letters'</script></head><body><h1>And I like the fact that 3 &gt; 1</h1>
</body></html>

questionAnswers(8)

yourAnswerToTheQuestion