Heading numbering again

Matej Cepl Cepl at fpm.cz
Thu Jun 17 04:35:22 EDT 1999


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)




More information about the Python-list mailing list