'Render a list of Result objects as a nicely formatted table.'

def _display(self, results):

    headers = ['Course    Key', 'cert_name_short', 'cert_name_short', 'Should    clean?']
    col_widths = [max((len(unicode(result[col])) for result in (results + [headers]))) for col in range(len(results[0]))]
    id_format = '{{:>{}}}    |'.format(len(unicode(len(results))))
    col_format = '|    {{:>{}}}    |'
    self.stdout.write(id_format.format(''), ending='')
    for (header, width) in zip(headers, col_widths):
        self.stdout.write(col_format.format(width).format(header), ending='')
    self.stdout.write('')
    for (idx, result) in enumerate(results):
        self.stdout.write(id_format.format(idx), ending='')
        for (col, width) in zip(result, col_widths):
            self.stdout.write(col_format.format(width).format(unicode(col)), ending='')
        self.stdout.write('')
