question on HTMLParser and parser.feed()

Stephen Briley sdb1031 at
Sat Dec 6 06:52:35 CET 2003


I'm new to Python, so please bear with me..

I am satisfied with the HTMLparse of my htmlsource
page.  But I am unable to save the output of
parser.feed(htmlsource).  When I type
parser.feed(htmlsource) into the interpreter, the
correct output streams across the screen.  But all of
my attempts to capture this output to a variable are
unsucessful (e.g. capt_text =

What am I missing and how can I get this to work? 
Thanks in advance!

from htmllib import HTMLParser
from formatter import AbstractFormatter, DumbWriter
parser = HTMLParser(AbstractFormatter(DumbWriter()))

Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.

More information about the Python-list mailing list