'Construct a new multi-column listbox widget.
:param master: The widget that should contain the new
multi-column listbox.
:param columns: Specifies what columns should be included in
the new multi-column listbox.  If ``columns`` is an integer,
the it is the number of columns to include.  If it is
a list, then its length indicates the number of columns
to include; and each element of the list will be used as
a label for the corresponding column.
:param cnf, kw: Configuration parameters for this widget.
Use ``label_*`` to configure all labels; and ``listbox_*``
to configure all listboxes.  E.g.:
>>> mlb = MultiListbox(master, 5, label_foreground=\'red\')'

def __init__(self, master, columns, column_weights=None, cnf={}, **kw):

    if isinstance(columns, int):
        columns = list(range(columns))
        include_labels = False
    else:
        include_labels = True
    if (len(columns) == 0):
        raise ValueError('Expected    at    least    one    column')
    self._column_names = tuple(columns)
    self._listboxes = []
    self._labels = []
    if (column_weights is None):
        column_weights = ([1] * len(columns))
    elif (len(column_weights) != len(columns)):
        raise ValueError('Expected    one    column_weight    for    each    column')
    self._column_weights = column_weights
    Frame.__init__(self, master, **self.FRAME_CONFIG)
    self.grid_rowconfigure(1, weight=1)
    for (i, label) in enumerate(self._column_names):
        self.grid_columnconfigure(i, weight=column_weights[i])
        if include_labels:
            l = Label(self, text=label, **self.LABEL_CONFIG)
            self._labels.append(l)
            l.grid(column=i, row=0, sticky='news', padx=0, pady=0)
            l.column_index = i
        lb = Listbox(self, **self.LISTBOX_CONFIG)
        self._listboxes.append(lb)
        lb.grid(column=i, row=1, sticky='news', padx=0, pady=0)
        lb.column_index = i
        lb.bind('<Button-1>', self._select)
        lb.bind('<B1-Motion>', self._select)
        lb.bind('<Button-4>', (lambda e: self._scroll((-1))))
        lb.bind('<Button-5>', (lambda e: self._scroll((+ 1))))
        lb.bind('<MouseWheel>', (lambda e: self._scroll(e.delta)))
        lb.bind('<Button-2>', (lambda e: self.scan_mark(e.x, e.y)))
        lb.bind('<B2-Motion>', (lambda e: self.scan_dragto(e.x, e.y)))
        lb.bind('<B1-Leave>', (lambda e: 'break'))
        l.bind('<Button-1>', self._resize_column)
    self.bind('<Button-1>', self._resize_column)
    self.bind('<Up>', (lambda e: self.select(delta=(-1))))
    self.bind('<Down>', (lambda e: self.select(delta=1)))
    self.bind('<Prior>', (lambda e: self.select(delta=(- self._pagesize()))))
    self.bind('<Next>', (lambda e: self.select(delta=self._pagesize())))
    self.configure(cnf, **kw)
