(self, header, line)
HTML table style
HTML table style
HTML table style
def output_html(self, header, line):
        "HTML table style"
        if header:
            if not self.header:
                return
            fmt = lambda x: self.colour.header + self._fmt_html_col(x) + self.colour.header_
        else:
            fmt = lambda x: self.colour.colour_value(x, self._fmt_html_col(x))
        line = [fmt(l) for l in line]
        out = ["<TR>"]
        for l in line:
            out.append(("<TD>", "<TH>")[header])
            out.append(l)
            out.append(("</TD>\n", "</TH>\n")[header])
        out.append("</TR>\n")
        self.write(self.stdout, "".join(out))
def output_html ( self , header , line ) : if header : if not self . header : return fmt = lambda x : self . colour . header + self . _fmt_html_col ( x ) + self . colour . header_ else : fmt = lambda x : self . colour . colour_value ( x , self . _fmt_html_col ( x ) ) line = [ fmt ( l ) for l in line ] out = [ "<TR>" ] for l in line : out . append ( ( "<TD>" , "<TH>" ) [ header ] ) out . append ( l ) out . append ( ( "</TD>\n" , "</TH>\n" ) [ header ] ) out . append ( "</TR>\n" ) self . write ( self . stdout , "" . join ( out ) )