I keep running into code like this:
tree = lxml.etree.parse( StringIO(bytes_data) )
The docs are actually very clear about this. There is a function called
etree.fromstring(data) that is meant to parse from a string. It is the same as in ElementTree. Obviously, no-one reads documentation. But it's there, really.