def emit_list(self, column_names, data, stdout, parsed_args):
        x = prettytable.PrettyTable(
            column_names,
            print_empty=False,
        )
        x.padding_width = 1
        # Figure out the types of the columns in the
        # first row and set the alignment of the
        # output accordingly.
        data_iter = iter(data)
        try:
            first_row = next(data_iter)
        except __HOLE__:
            pass
        else:
            for value, name in zip(first_row, column_names):
                alignment = self.ALIGNMENTS.get(type(value), 'l')
                x.align[name] = alignment
            # Now iterate over the data and add the rows.
            x.add_row(first_row)
            for row in data_iter:
                row = [r.replace('\r\n', '\n').replace('\r', ' ')
                       if isinstance(r, six.string_types) else r
                       for r in row]
                x.add_row(row)

        # Choose a reasonable min_width to better handle many columns on a
        # narrow console. The table will overflow the console width in
        # preference to wrapping columns smaller than 8 characters.
        min_width = 8
        self._assign_max_widths(
            stdout, x, int(parsed_args.max_width), min_width)

        formatted = x.get_string()
        stdout.write(formatted)
        stdout.write('\n')
        return
dataset/ETHPy150Open openstack/cliff/cliff/formatters/table.py/TableFormatter.emit_list