file.getvalue() with _ or other characters
martijn at gamecreators.nl
martijn at gamecreators.nl
Thu Mar 3 08:50:42 EST 2005
mmm I'm a newbie with python.
I did this but don't work:
class mvbHTMLParser(htmllib.HTMLParser):
def __init__(self, formatter, verbose=0):
htmllib.HTMLParser.__init__(self,formatter,verbose)
self.imglist = []
def handle_image(self,src,alt,*args):
self.imglist.append(src)
class PreservingStringIO(StringIO.StringIO):
def close(self):
pass
file = PreservingStringIO()
f = formatter.AbstractFormatter(formatter.DumbWriter(file))
p = mvbHTMLParser(f)
p.feed(html)
p.close()
print file.getvalue()
---- i will try some things
More information about the Python-list
mailing list