You can have non-ASCII characters in element names (and element content). Use Unicode strings and it should work.
At http://effbot.org/zone/element.htm#the-element-type, it says:
All elements must have a tag, but all other properties are optional. All strings can either be Unicode strings, or 8-bit strings containing US-ASCII only.
Demo program (tested with Python 2.7):
# coding: utf-8
import xml.etree.ElementTree as ET
root = ET.Element(u'Prüfung')
main = ET.SubElement(root, 'Test')
main.text = u'\xe4 ' + u'ä'
tree = ET.ElementTree(root)
tree.write('testout.xml', encoding="utf-8") # The default encoding is us-ascii
Output (in testout.xml):
<Prüfung><Test>ä ä</Test></Prüfung>
The above program also works unchanged in Python 3.3+. The leading u
characters are redundant, but allowed (the u'unicode'
syntax is restored for str
objects in Python 3.3).