'Construct a new Table widget.
:type master: Tkinter.Widget
:param master: The widget that should contain the new table.
:type column_names: list(str)
:param column_names: A list of names for the columns; these
names will be used to create labels for each column;
and can be used as an index when reading or writing
cell values from the table.
:type rows: list(list)
:param rows: A list of row values used to initialze the table.
Each row value should be a tuple of cell values, one for
each column in the row.
:type scrollbar: bool
:param scrollbar: If true, then create a scrollbar for the
new table widget.
:type click_to_sort: bool
:param click_to_sort: If true, then create bindings that will
sort the table\'s rows by a given column\'s values if the
user clicks on that colum\'s label.
:type reprfunc: function
:param reprfunc: If specified, then use this function to
convert each table cell value to a string suitable for
display.  ``reprfunc`` has the following signature:
reprfunc(row_index, col_index, cell_value) -> str
(Note that the column is specified by index, not by name.)
:param cnf, kw: Configuration parameters for this widget\'s
contained ``MultiListbox``.  See ``MultiListbox.__init__()``
for details.'

def __init__(self, master, column_names, rows=None, column_weights=None, scrollbar=True, click_to_sort=True, reprfunc=None, cnf={}, **kw):

    self._num_columns = len(column_names)
    self._reprfunc = reprfunc
    self._frame = Frame(master)
    self._column_name_to_index = dict(((c, i) for (i, c) in enumerate(column_names)))
    if (rows is None):
        self._rows = []
    else:
        self._rows = [[v for v in row] for row in rows]
    for row in self._rows:
        self._checkrow(row)
    self._mlb = MultiListbox(self._frame, column_names, column_weights, cnf, **kw)
    self._mlb.pack(side='left', expand=True, fill='both')
    if scrollbar:
        sb = Scrollbar(self._frame, orient='vertical', command=self._mlb.yview)
        self._mlb.listboxes[0]['yscrollcommand'] = sb.set
        sb.pack(side='right', fill='y')
        self._scrollbar = sb
    self._sortkey = None
    if click_to_sort:
        for (i, l) in enumerate(self._mlb.column_labels):
            l.bind('<Button-1>', self._sort)
    self._fill_table()
