Mailing List Archive

Heading numbering again
What's wrong with my use of htmllib.py, that when I define in my class
(derived from htmllib.HTMLParser) following method, nothing happens on
output?

Thanks
Matthew
-------------------------------------------------------------

def start_h2(self,attrib):
"set level on 2 and increment last_num"
self.out.write("<%s" % tag)
for pair in attributes:
self.out.write(" %s = \"%s\"" % pair)
self.out.write(">")
self.level = 2
self.last_num = self.last_num + 1
self.out.write("%s " % self.last_num)