@@ -222,7 +222,7 @@ class Form:
222222 See Tix documentation for complete details"""
223223
224224 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 ))
226226
227227 form = config
228228
@@ -292,7 +292,7 @@ def __init__ (self, master=None, widgetName=None,
292292 static_options .append ('options' )
293293 else :
294294 static_options = ['options' ]
295-
295+
296296 for k ,v in cnf .items ()[:]:
297297 if k in static_options :
298298 extra = extra + ('-' + k , v )
@@ -304,7 +304,7 @@ def __init__ (self, master=None, widgetName=None,
304304 # If widgetName is None, this is a dummy creation call where the
305305 # corresponding Tk widget has already been created by Tix
306306 if widgetName :
307- apply ( self .tk .call , (widgetName , self ._w ) + extra )
307+ self .tk .call (widgetName , self ._w , * extra )
308308
309309 # Non-static options - to be done via a 'config' command
310310 if cnf :
@@ -474,8 +474,8 @@ def __init__(self, itemtype, cnf={}, **kw ):
474474 elif not master and kw .has_key ('refwindow' ): master = kw ['refwindow' ]
475475 elif not master : raise RuntimeError , "Too early to create display style: no root window"
476476 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 ) )
479479
480480 def __str__ (self ):
481481 return self .stylename
@@ -499,8 +499,8 @@ def __setitem__(self,key,value):
499499 def config (self , cnf = {}, ** kw ):
500500 return _lst2dict (
501501 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 ))))
504504
505505 def __getitem__ (self ,key ):
506506 return self .tk .call (self .stylename , 'cget' , '-%s' % key )
@@ -532,8 +532,7 @@ def __init__(self, master=None, cnf={}, **kw):
532532 def bind_widget (self , widget , cnf = {}, ** kw ):
533533 """Bind balloon widget to another.
534534 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 ))
537536
538537 def unbind_widget (self , widget ):
539538 self .tk .call (self ._w , 'unbind' , widget ._w )
@@ -549,8 +548,7 @@ def __init__(self, master=None, cnf={}, **kw):
549548 def add (self , name , cnf = {}, ** kw ):
550549 """Add a button with given name to box."""
551550
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 ))
554552 self .subwidget_list [name ] = _dummyButton (self , name )
555553 return btn
556554
@@ -589,7 +587,7 @@ def __init__ (self, master=None, cnf={}, **kw):
589587 pass
590588
591589 # align
592-
590+
593591 def add_history (self , str ):
594592 self .tk .call (self ._w , 'addhistory' , str )
595593
@@ -862,14 +860,13 @@ def __init__ (self,master=None,cnf={}, **kw):
862860 ['columns' , 'options' ], cnf , kw )
863861
864862 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 ))
867864
868865 def add_child (self , parent = None , cnf = {}, ** kw ):
869866 if not parent :
870867 parent = ''
871- return apply ( self .tk .call ,
872- ( self ._w , 'addchild' , parent ) + self ._options (cnf , kw ))
868+ return self .tk .call (
869+ self ._w , 'addchild' , parent , * self ._options (cnf , kw ))
873870
874871 def anchor_set (self , entry ):
875872 self .tk .call (self ._w , 'anchor' , 'set' , entry )
@@ -909,16 +906,15 @@ def dropsite_clear(self):
909906 self .tk .call (self ._w , 'dropsite' , 'clear' )
910907
911908 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 ))
914910
915911 def header_configure (self , col , cnf = {}, ** kw ):
916912 if cnf is None :
917913 return _lst2dict (
918914 self .tk .split (
919915 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 ))
922918
923919 def header_cget (self , col , opt ):
924920 return self .tk .call (self ._w , 'header' , 'cget' , col , opt )
@@ -936,16 +932,16 @@ def hide_entry(self, entry):
936932 self .tk .call (self ._w , 'hide' , 'entry' , entry )
937933
938934 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 ))
941937
942938 def indicator_configure (self , entry , cnf = {}, ** kw ):
943939 if cnf is None :
944940 return _lst2dict (
945941 self .tk .split (
946942 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 ))
949945
950946 def indicator_cget (self , entry , opt ):
951947 return self .tk .call (self ._w , 'indicator' , 'cget' , entry , opt )
@@ -996,12 +992,12 @@ def item_configure(self, entry, col, cnf={}, **kw):
996992 return _lst2dict (
997993 self .tk .split (
998994 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 ))
1001997
1002998 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 ))
10051001
10061002 def item_exists (self , entry , col ):
10071003 return self .tk .call (self ._w , 'item' , 'exists' , entry , col )
@@ -1016,8 +1012,7 @@ def see(self, entry):
10161012 self .tk .call (self ._w , 'see' , entry )
10171013
10181014 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 ))
10211016
10221017 def selection_includes (self , entry ):
10231018 return self .tk .call (self ._w , 'selection' , 'includes' , entry )
@@ -1029,10 +1024,10 @@ def show_entry(self, entry):
10291024 return self .tk .call (self ._w , 'show' , 'entry' , entry )
10301025
10311026 def xview (self , * args ):
1032- apply ( self .tk .call , (self ._w , 'xview' ) + args )
1027+ self .tk .call (self ._w , 'xview' , * args )
10331028
10341029 def yview (self , * args ):
1035- apply ( self .tk .call , (self ._w , 'yview' ) + args )
1030+ self .tk .call (self ._w , 'yview' , * args )
10361031
10371032class InputOnly (TixWidget ):
10381033 """InputOnly - Invisible widget. Unix only.
@@ -1093,8 +1088,7 @@ def __init__(self, master, cnf={}, **kw):
10931088 self .subwidget_list ['shlist' ] = _dummyScrolledHList (self , 'shlist' )
10941089
10951090 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 ))
10981092 self .subwidget_list [name ] = TixSubWidget (self , name )
10991093 return self .subwidget_list [name ]
11001094
@@ -1135,8 +1129,7 @@ def __init__ (self,master=None,cnf={}, **kw):
11351129 destroy_physically = 0 )
11361130
11371131 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 ))
11401133 self .subwidget_list [name ] = TixSubWidget (self , name )
11411134 return self .subwidget_list [name ]
11421135
@@ -1180,12 +1173,10 @@ def __init__(self, master, cnf={}, **kw):
11801173 self .subwidget_list ['menu' ] = _dummyMenu (self , 'menu' )
11811174
11821175 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 ))
11851177
11861178 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 ))
11891180
11901181 def delete (self , name ):
11911182 self .tk .call (self ._w , 'delete' , name )
@@ -1212,8 +1203,7 @@ def __init__(self, master, cnf={}, **kw):
12121203
12131204 # add delete forget panecget paneconfigure panes setsize
12141205 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 ))
12171207 self .subwidget_list [name ] = TixSubWidget (self , name ,
12181208 check_intermediate = 0 )
12191209 return self .subwidget_list [name ]
@@ -1234,8 +1224,7 @@ def paneconfigure(self, entry, cnf={}, **kw):
12341224 return _lst2dict (
12351225 self .tk .split (
12361226 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 ))
12391228
12401229 def panes (self ):
12411230 names = self .tk .call (self ._w , 'panes' )
@@ -1361,8 +1350,7 @@ def __init__(self, master, cnf={}, **kw):
13611350 self .subwidget_list ['label' ] = _dummyLabel (self , 'label' )
13621351
13631352 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 ))
13661354 self .subwidget_list [name ] = _dummyButton (self , name )
13671355 return self .subwidget_list [name ]
13681356
@@ -1458,8 +1446,7 @@ def dropsite_clear(self):
14581446 self .tk .call (self ._w , 'dropsite' , 'clear' )
14591447
14601448 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 ))
14631450
14641451 def info_active (self ):
14651452 return self .tk .call (self ._w , 'info' , 'active' )
@@ -1493,8 +1480,7 @@ def see(self, index):
14931480 self .tk .call (self ._w , 'see' , index )
14941481
14951482 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 ))
14981484
14991485 def selection_includes (self , index ):
15001486 return self .tk .call (self ._w , 'selection' , 'includes' , index )
@@ -1503,10 +1489,10 @@ def selection_set(self, first, last=None):
15031489 self .tk .call (self ._w , 'selection' , 'set' , first , last )
15041490
15051491 def xview (self , * args ):
1506- apply ( self .tk .call , (self ._w , 'xview' ) + args )
1492+ self .tk .call (self ._w , 'xview' , * args )
15071493
15081494 def yview (self , * args ):
1509- apply ( self .tk .call , (self ._w , 'yview' ) + args )
1495+ self .tk .call (self ._w , 'yview' , * args )
15101496
15111497class Tree (TixWidget ):
15121498 """Tree - The tixTree widget can be used to display hierachical
@@ -1807,7 +1793,7 @@ class Grid(TixWidget):
18071793 # def unset x y
18081794 # def xview
18091795 # def yview
1810-
1796+
18111797class ScrolledGrid (TixWidget ):
18121798 '''Scrolled Grid widgets'''
18131799
0 commit comments