#!/usr/local/bin/python2 import xml.etree.ElementTree as ET print ET.TreeBuilder().start('a', {'b': 'y'})