As soon as I modify the tail of an element (default is None), writing with pretty_print deletes all indentation. Everything is on a single line.
Combining pretty_print and tail is not possible ?
Example:
from lxml import etree as et
root = et.Element("MY_DOC")
date = et.SubElement(root, "date")
date.text = "2014-09-29"
date.tail="\n" # to separate more the following section
name = et.SubElement(root, "name")
name.text = "should be 2 lines after"
tree=et.ElementTree(root)
tree.write('output.xml', encoding="UTF-8", pretty_print=True)