reader = Sax2.Reader() doc = reader.fromStream(open('foo.html'))