'Generates from a list of rows a PrettyTable object.'

def generate_table(self, rows):

    table = PrettyTable(**self.kwargs)
    for row in self.rows:
        if (len(row[0]) < self.max_row_width):
            appends = (self.max_row_width - len(row[0]))
            for i in range(1, appends):
                row[0].append('-')
        if (row[1] == True):
            self.make_fields_unique(row[0])
            table.field_names = row[0]
        else:
            table.add_row(row[0])
    return table
