def format_column_rows(self, headers, rows, widths = None):
        if not widths:
            if self.show_headers:
                widths = [ len(s) + 4 for s in headers ]
            else:
                widths = [ self.default_width ] * len(headers)
        # override widths if they are set manually
        for col, width in enumerate(widths):
            if self.manual_widths in col:
                widths[col] = self.manual_widths[col]
        # the total width is the sum of widths plus | for each col
        total = sum(widths) + (len(widths) - 1)
        # draw a bar like ---+---+---
        bar = '+'.join('-' * (x + 2) for x in widths)
        # surround it with + to make +---+---+---+
        bar = '+' + bar + '+'
        # build up a format string like %-5.5s|%-6.6s
        format = '|'.join((' %%-%d.%ds ' % (x, x)) for x in widths)
        # and surround it with |
        format = '|' + format + '|'
        yield 0, bar
        if self.show_headers:
            yield 0, format % tuple(' %s ' %x for x in headers)
            yield 0, bar
        for row in rows:
            yield 1, format % tuple(row)
        yield 0, bar
dataset/ETHPy150Open sassoftware/conary/conary/dbstore/shell.py/DbShell.format_column_rows/swapped operands of `in`