@@ -222,7 +222,7 @@ class Form:
222
222
See Tix documentation for complete details"""
223
223
224
224
def config (self , cnf = {}, ** kw ):
225
- apply ( self .tk .call , ('tixForm' , self ._w ) + self ._options (cnf , kw ))
225
+ self .tk .call ('tixForm' , self ._w , * self ._options (cnf , kw ))
226
226
227
227
form = config
228
228
@@ -292,7 +292,7 @@ def __init__ (self, master=None, widgetName=None,
292
292
static_options .append ('options' )
293
293
else :
294
294
static_options = ['options' ]
295
-
295
+
296
296
for k ,v in cnf .items ()[:]:
297
297
if k in static_options :
298
298
extra = extra + ('-' + k , v )
@@ -304,7 +304,7 @@ def __init__ (self, master=None, widgetName=None,
304
304
# If widgetName is None, this is a dummy creation call where the
305
305
# corresponding Tk widget has already been created by Tix
306
306
if widgetName :
307
- apply ( self .tk .call , (widgetName , self ._w ) + extra )
307
+ self .tk .call (widgetName , self ._w , * extra )
308
308
309
309
# Non-static options - to be done via a 'config' command
310
310
if cnf :
@@ -474,8 +474,8 @@ def __init__(self, itemtype, cnf={}, **kw ):
474
474
elif not master and kw .has_key ('refwindow' ): master = kw ['refwindow' ]
475
475
elif not master : raise RuntimeError , "Too early to create display style: no root window"
476
476
self .tk = master .tk
477
- self .stylename = apply ( self .tk .call , ('tixDisplayStyle' , itemtype ) +
478
- self ._options (cnf ,kw ) )
477
+ self .stylename = self .tk .call ('tixDisplayStyle' , itemtype ,
478
+ * self ._options (cnf ,kw ) )
479
479
480
480
def __str__ (self ):
481
481
return self .stylename
@@ -499,8 +499,8 @@ def __setitem__(self,key,value):
499
499
def config (self , cnf = {}, ** kw ):
500
500
return _lst2dict (
501
501
self .tk .split (
502
- apply ( self .tk .call ,
503
- ( self .stylename , 'configure' ) + self ._options (cnf ,kw ))))
502
+ self .tk .call (
503
+ self .stylename , 'configure' , * self ._options (cnf ,kw ))))
504
504
505
505
def __getitem__ (self ,key ):
506
506
return self .tk .call (self .stylename , 'cget' , '-%s' % key )
@@ -532,8 +532,7 @@ def __init__(self, master=None, cnf={}, **kw):
532
532
def bind_widget (self , widget , cnf = {}, ** kw ):
533
533
"""Bind balloon widget to another.
534
534
One balloon widget may be bound to several widgets at the same time"""
535
- apply (self .tk .call ,
536
- (self ._w , 'bind' , widget ._w ) + self ._options (cnf , kw ))
535
+ self .tk .call (self ._w , 'bind' , widget ._w , * self ._options (cnf , kw ))
537
536
538
537
def unbind_widget (self , widget ):
539
538
self .tk .call (self ._w , 'unbind' , widget ._w )
@@ -549,8 +548,7 @@ def __init__(self, master=None, cnf={}, **kw):
549
548
def add (self , name , cnf = {}, ** kw ):
550
549
"""Add a button with given name to box."""
551
550
552
- btn = apply (self .tk .call ,
553
- (self ._w , 'add' , name ) + self ._options (cnf , kw ))
551
+ btn = self .tk .call (self ._w , 'add' , name , * self ._options (cnf , kw ))
554
552
self .subwidget_list [name ] = _dummyButton (self , name )
555
553
return btn
556
554
@@ -589,7 +587,7 @@ def __init__ (self, master=None, cnf={}, **kw):
589
587
pass
590
588
591
589
# align
592
-
590
+
593
591
def add_history (self , str ):
594
592
self .tk .call (self ._w , 'addhistory' , str )
595
593
@@ -862,14 +860,13 @@ def __init__ (self,master=None,cnf={}, **kw):
862
860
['columns' , 'options' ], cnf , kw )
863
861
864
862
def add (self , entry , cnf = {}, ** kw ):
865
- return apply (self .tk .call ,
866
- (self ._w , 'add' , entry ) + self ._options (cnf , kw ))
863
+ return self .tk .call (self ._w , 'add' , entry , * self ._options (cnf , kw ))
867
864
868
865
def add_child (self , parent = None , cnf = {}, ** kw ):
869
866
if not parent :
870
867
parent = ''
871
- return apply ( self .tk .call ,
872
- ( self ._w , 'addchild' , parent ) + self ._options (cnf , kw ))
868
+ return self .tk .call (
<
10000
code> 869
+ self ._w , 'addchild' , parent , * self ._options (cnf , kw ))
873
870
874
871
def anchor_set (self , entry ):
875
872
self .tk .call (self ._w , 'anchor' , 'set' , entry )
@@ -909,16 +906,15 @@ def dropsite_clear(self):
909
906
self .tk .call (self ._w , 'dropsite' , 'clear' )
910
907
911
908
def header_create (self , col , cnf = {}, ** kw ):
912
- apply (self .tk .call ,
913
- (self ._w , 'header' , 'create' , col ) + self ._options (cnf , kw ))
909
+ self .tk .call (self ._w , 'header' , 'create' , col , * self ._options (cnf , kw ))
914
910
915
911
def header_configure (self , col , cnf = {}, ** kw ):
916
912
if cnf is None :
917
913
return _lst2dict (
918
914
self .tk .split (
919
915
self .tk .call (self ._w , 'header' , 'configure' , col )))
920
- apply ( self .tk .call , (self ._w , 'header' , 'configure' , col )
921
- + self ._options (cnf , kw ))
916
+ self .tk .call (self ._w , 'header' , 'configure' , col ,
917
+ * self ._options (cnf , kw ))
922
918
923
919
def header_cget (self , col , opt ):
924
920
return self .tk .call (self ._w , 'header' , 'cget' , col , opt )
@@ -936,16 +932,16 @@ def hide_entry(self, entry):
936
932
self .tk .call (self ._w , 'hide' , 'entry' , entry )
937
933
938
934
def indicator_create (self , entry , cnf = {}, ** kw ):
939
- apply ( self .tk .call ,
940
- ( self ._w , 'indicator' , 'create' , entry ) + self ._options (cnf , kw ))
935
+ self .tk .call (
936
+ self ._w , 'indicator' , 'create' , entry , * self ._options (cnf , kw ))
941
937
942
938
def indicator_configure (self , entry , cnf = {}, ** kw ):
943
939
if cnf is None :
944
940
return _lst2dict (
945
941
self .tk .split (
946
942
self .tk .call (self ._w , 'indicator' , 'configure' , entry )))
947
- apply ( self .tk .call ,
948
- ( self ._w , 'indicator' , 'configure' , entry ) + self ._options (cnf , kw ))
943
+ self .tk .call (
944
+ self ._w , 'indicator' , 'configure' , entry , * self ._options (cnf , kw ))
949
945
950
946
def indicator_cget (self , entry , opt ):
951
947
return self .tk .call (self ._w , 'indicator' , 'cget' , entry , opt )
@@ -996,12 +992,12 @@ def item_configure(self, entry, col, cnf={}, **kw):
996
992
return _lst2dict (
997
993
self .tk .split (
998
994
self .tk .call (self ._w , 'item' , 'configure' , entry , col )))
999
- apply ( self .tk .call , (self ._w , 'item' , 'configure' , entry , col ) +
1000
- self ._options (cnf , kw ))
995
+ self .tk .call (self ._w , 'item' , 'configure' , entry , col ,
996
+ * self ._options (cnf , kw ))
1001
997
1002
998
def item_create (self , entry , col , cnf = {}, ** kw ):
1003
- apply ( self .tk .call ,
1004
- ( self ._w , 'item' , 'create' , entry , col ) + self ._options (cnf , kw ))
999
+ self .tk .call (
1000
+ self ._w , 'item' , 'create' , entry , col , * self ._options (cnf , kw ))
1005
1001
1006
1002
def item_exists (self , entry , col ):
1007
1003
return self .tk .call (self ._w , 'item' , 'exists' , entry , col )
@@ -1016,8 +1012,7 @@ def see(self, entry):
1016
1012
self .tk .call (self ._w , 'see' , entry )
1017
1013
1018
1014
def selection_clear (self , cnf = {}, ** kw ):
1019
- apply (self .tk .call ,
1020
- (self ._w , 'selection' , 'clear' ) + self ._options (cnf , kw ))
1015
+ self .tk .call (self ._w , 'selection' , 'clear' , * self ._options (cnf , kw ))
1021
1016
1022
1017
def selection_includes (self , entry ):
1023
1018
return self .tk .call (self ._w , 'selection' , 'includes' , entry )
@@ -1029,10 +1024,10 @@ def show_entry(self, entry):
1029
1024
return self .tk .call (self ._w , 'show' , 'entry' , entry )
1030
1025
1031
1026
def xview (self , * args ):
1032
- apply ( self .tk .call , (self ._w , 'xview' ) + args )
1027
+ self .tk .call (self ._w , 'xview' , * args )
1033
1028
1034
1029
def yview (self , * args ):
1035
- apply ( self .tk .call , (self ._w , 'yview' ) + args )
1030
+ self .tk .call (self ._w , 'yview' , * args )
1036
1031
1037
1032
class InputOnly (TixWidget ):
1038
1033
"""InputOnly - Invisible widget. Unix only.
@@ -1093,8 +1088,7 @@ def __init__(self, master, cnf={}, **kw):
1093
1088
self .subwidget_list ['shlist' ] = _dummyScrolledHList (self , 'shlist' )
1094
1089
1095
1090
def add (self , name , cnf = {}, ** kw ):
1096
- apply (self .tk .call ,
1097
- (self ._w , 'add' , name ) + self ._options (cnf , kw ))
1091
+ self .tk .call (self ._w , 'add' , name , * self ._options (cnf , kw ))
1098
1092
self .subwidget_list [name ] = TixSubWidget (self , name )
1099
1093
return self .subwidget_list [name ]
1100
1094
@@ -1135,8 +1129,7 @@ def __init__ (self,master=None,cnf={}, **kw):
1135
1129
destroy_physically = 0 )
1136
1130
1137
1131
def add (self , name , cnf = {}, ** kw ):
1138
- apply (self .tk .call ,
1139
- (self ._w , 'add' , name ) + self ._options (cnf , kw ))
1132
+ self .tk .call (self ._w , 'add' , name , * self ._options (cnf , kw ))
1140
1133
self .subwidget_list [name ] = TixSubWidget (self , name )
1141
1134
return self .subwidget_list [name ]
1142
1135
@@ -1180,12 +1173,10 @@ def __init__(self, master, cnf={}, **kw):
1180
1173
self .subwidget_list ['menu' ] = _dummyMenu (self , 'menu' )
1181
1174
1182
1175
def add_command (self , name , cnf = {}, ** kw ):
1183
- apply (self .tk .call ,
1184
- (self ._w , 'add' , 'command' , name ) + self ._options (cnf , kw ))
1176
+ self .tk .call (self ._w , 'add' , 'command' , name , * self ._options (cnf , kw ))
1185
1177
1186
1178
def add_separator (self , name , cnf = {}, ** kw ):
1187
- apply (self .tk .call ,
1188
- (self ._w , 'add' , 'separator' , name ) + self ._options (cnf , kw ))
1179
+ self .tk .call (self ._w , 'add' , 'separator' , name , * self ._options (cnf , kw ))
1189
1180
1190
1181
def delete (self , name ):
1191
1182
self .tk .call (self ._w , 'delete' , name )
@@ -1212,8 +1203,7 @@ def __init__(self, master, cnf={}, **kw):
1212
1203
1213
1204
# add delete forget panecget paneconfigure panes setsize
1214
1205
def add (self , name , cnf = {}, ** kw ):
1215
- apply (self .tk .call ,
1216
- (self ._w , 'add' , name ) + self ._options (cnf , kw ))
1206
+ self .tk .call (self ._w , 'add' , name , * self ._options (cnf , kw ))
1217
1207
self .subwidget_list [name ] = TixSubWidget (self , name ,
1218
1208
check_intermediate = 0 )
1219
1209
return self .subwidget_list [name ]
@@ -1234,8 +1224,7 @@ def paneconfigure(self, entry, cnf={}, **kw):
1234
1224
return _lst2dict (
1235
1225
self .tk .split (
1236
1226
self .tk .call (self ._w , 'paneconfigure' , entry )))
1237
- apply (self .tk .call ,
1238
- (self ._w , 'paneconfigure' , entry ) + self ._options (cnf , kw ))
1227
+ self .tk .call (self ._w , 'paneconfigure' , entry , * self ._options (cnf , kw ))
1239
1228
1240
1229
def panes (self ):
1241
1230
names = self .tk .call (self ._w , 'panes' )
@@ -1361,8 +1350,7 @@ def __init__(self, master, cnf={}, **kw):
1361
1350
self .subwidget_list ['label' ] = _dummyLabel (self , 'label' )
1362
1351
1363
1352
def add (self , name , cnf = {}, ** kw ):
1364
- apply (self .tk .call ,
1365
- (self ._w , 'add' , name ) + self ._options (cnf , kw ))
1353
+ self .tk .call (self ._w , 'add' , name , * self ._options (cnf , kw ))
1366
1354
self .subwidget_list [name ] = _dummyButton (self , name )
1367
1355
return self .subwidget_list [name ]
1368
1356
@@ -1458,8 +1446,7 @@ def dropsite_clear(self):
1458
1446
self .tk .call (self ._w , 'dropsite' , 'clear' )
1459
1447
1460
1448
def insert (self , index , cnf = {}, ** kw ):
1461
- apply (self .tk .call ,
1462
- (self ._w , 'insert' , index ) + self ._options (cnf , kw ))
1449
+ self .tk .call (self ._w , 'insert' , index , * self ._options (cnf , kw ))
1463
1450
1464
1451
def info_active (self ):
1465
1452
return self .tk .call (self ._w , 'info' , 'active' )
@@ -1493,8 +1480,7 @@ def see(self, index):
1493
1480
self .tk .call (self ._w , 'see' , index )
1494
1481
1495
1482
def selection_clear (self , cnf = {}, ** kw ):
1496
- apply (self .tk .call ,
1497
- (self ._w , 'selection' , 'clear' ) + self ._options (cnf , kw ))
1483
+ self .tk .call (self ._w , 'selection' , 'clear' , * self ._options (cnf , kw ))
1498
1484
1499
1485
def selection_includes (self , index ):
1500
1486
return self .tk .call (self ._w , 'selection' , 'includes' , index )
@@ -1503,10 +1489,10 @@ def selection_set(self, first, last=None):
1503
1489
self .tk .call (self ._w , 'selection' , 'set' , first , last )
1504
1490
1505
1491
def xview (self , * args ):
1506
- apply ( self .tk .call , (self ._w , 'xview' ) + args )
1492
+ self .tk .call (self ._w , 'xview' , * args )
1507
1493
1508
1494
def yview (self , * args ):
1509
- apply ( self .tk .call , (self ._w , 'yview' ) + args )
1495
+ self .tk .call (self ._w , 'yview' , * args )
1510
1496
1511
1497
class Tree (TixWidget ):
1512
1498
"""Tree - The tixTree widget can be used to display hierachical
@@ -1807,7 +1793,7 @@ class Grid(TixWidget):
1807
1793
# def unset x y
1808
1794
# def xview
1809
1795
# def yview
1810
-
1796
+
1811
1797
class ScrolledGrid (TixWidget ):
1812
1798
'''Scrolled Grid widgets'''
1813
1799
0 commit comments