Well, it seems you can do:
parser = elementtidy.TidyHTMLTreeBuilder.TidyHTMLTreeBuilder()
parser.feed(your_str)
tree = elementtree.ElementTree.ElementTree(element=parser.close())
Look at the parse() method in the ElementTree class.
--
http://mail.python.org/mailman/listinfo/python-list
So I see that elementtidy doesn't like strings with \0 characters in them:
>>> import urllib
>>> from elementtidy import TidyHTMLTreeBuilder
>>> url = 'http://news.bbc.co.uk/1/hi/world/europe/492215.stm'
>>> url_file = urllib.urlopen(url)
>>> tree = TidyHTMLTreeBuilder.parse(url_file)
Traceba