Re: Turning HTMLParser into an iterator

2009-05-31 Thread Stefan Behnel
samwyse wrote: > I'm processing some potentially large datasets stored as HTML. I've > subclassed HTMLParser so that handle_endtag() accumulates data into a > list, which I can then fetch when everything's done. I'd prefer, > however, to have handle_endtag() somehow yield values while the input >

Turning HTMLParser into an iterator

2009-05-31 Thread samwyse
I'm processing some potentially large datasets stored as HTML. I've subclassed HTMLParser so that handle_endtag() accumulates data into a list, which I can then fetch when everything's done. I'd prefer, however, to have handle_endtag() somehow yield values while the input data is still streaming