'Return widths of columns + self.colpad'

def get_widths(self, maxwidth):

    (rows, cols) = (self.number_or_rows(), self.number_of_columns())
    widths = range(cols)
    for c in range(cols):
        cellwidths = [0 for i in range(rows)]
        for r in range(rows):
            try:
                cellwidths[r] = self.rows[r].preferred_width(c)
            except IndexError:
                continue
        widths[c] = max(cellwidths)
    min_widths = [(self.minimum_width(i) + 10) for i in xrange(cols)]
    for i in xrange(len(widths)):
        wp = self.width_percent(i)
        if (wp >= 0.0):
            widths[i] = max(min_widths[i], ceil(((wp / 100.0) * (maxwidth - ((cols - 1) * self.colpad)))))
    itercount = 0
    while ((sum(widths) > (maxwidth - ((len(widths) - 1) * self.colpad))) and (itercount < 100)):
        for i in range(cols):
            widths[i] = (ceil(((95.0 / 100.0) * widths[i])) if (ceil(((95.0 / 100.0) * widths[i])) >= min_widths[i]) else widths[i])
        itercount += 1
    return [(i + self.colpad) for i in widths]
