@@ -76,13 +76,8 @@ def __init__(self, master, columns, column_weights=None, cnf={}, **kw):
7676 :param cnf, kw: Configuration parameters for this widget.
7777 Use ``label_*`` to configure all labels; and ``listbox_*``
7878 to configure all listboxes. E.g.:
79- >>> from nltk.draw.util import TextWidget, CanvasFrame, SpaceWidget
80- >>> from nltk.draw.table import MultiListbox
81- >>> cf = CanvasFrame(closeenough=10, width=300, height=300)
82- >>> c = cf.canvas()
83- >>> master = TextWidget(c, "hiya there", draggable=1)
84- >>> master = SpaceWidget(c, 0, 30)
85- >>> mlb = MultiListbox(master, 5, label_foreground='red')
79+ >>> root = Tk() # doctest: +SKIP
80+ >>> MultiListbox(root, ["Subject", "Sender", "Date"], label_foreground='red').pack() # doctest: +SKIP
8681 """
8782 # If columns was specified as an int, convert it to a list.
8883 if isinstance (columns , int ):
@@ -139,7 +134,7 @@ def __init__(self, master, columns, column_weights=None, cnf={}, **kw):
139134 # the default listbox behavior, which scrolls):
140135 lb .bind ("<B1-Leave>" , lambda e : "break" )
141136 # Columns can be resized by dragging them:
142- l .bind ("<Button-1>" , self ._resize_column )
137+ lb .bind ("<Button-1>" , self ._resize_column )
143138
144139 # Columns can be resized by dragging them. (This binding is
145140 # used if they click on the grid between columns:)
@@ -305,9 +300,10 @@ def configure(self, cnf={}, **kw):
305300 Configure this widget. Use ``label_*`` to configure all
306301 labels; and ``listbox_*`` to configure all listboxes. E.g.:
307302
308- >>> mlb = MultiListbox(master, 5)
309- >>> mlb.configure(label_foreground='red')
310- >>> mlb.configure(listbox_foreground='red')
303+ >>> master = Tk() # doctest: +SKIP
304+ >>> mlb = MultiListbox(master, 5) # doctest: +SKIP
305+ >>> mlb.configure(label_foreground='red') # doctest: +SKIP
306+ >>> mlb.configure(listbox_foreground='red') # doctest: +SKIP
311307 """
312308 cnf = dict (list (cnf .items ()) + list (kw .items ()))
313309 for (key , val ) in list (cnf .items ()):
@@ -592,13 +588,13 @@ class Table:
592588 refers to the j-th column of the i-th row. This can be used to
593589 both read and write values from the table. E.g.:
594590
595- >>> table[i,j] = 'hello'
591+ >>> table[i,j] = 'hello' # doctest: +SKIP
596592
597593 The column (j) can be given either as an index number, or as a
598594 column name. E.g., the following prints the value in the 3rd row
599595 for the 'First Name' column:
600596
601- >>> print(table[3, 'First Name'])
597+ >>> print(table[3, 'First Name']) # doctest: +SKIP
602598 John
603599
604600 You can configure the colors for individual rows, columns, or
0 commit comments