summaryrefslogtreecommitdiffstats
path: root/Demo/tkinter/guido
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/tkinter/guido')
-rwxr-xr-xDemo/tkinter/guido/AttrDialog.py3
-rwxr-xr-xDemo/tkinter/guido/ManPage.py4
-rwxr-xr-xDemo/tkinter/guido/ShellWindow.py2
-rwxr-xr-xDemo/tkinter/guido/kill.py2
-rw-r--r--Demo/tkinter/guido/optionmenu.py2
-rw-r--r--Demo/tkinter/guido/sortvisu.py3
-rwxr-xr-xDemo/tkinter/guido/svkill.py4
7 files changed, 9 insertions, 11 deletions
diff --git a/Demo/tkinter/guido/AttrDialog.py b/Demo/tkinter/guido/AttrDialog.py
index 86333ad..9fa699e 100755
--- a/Demo/tkinter/guido/AttrDialog.py
+++ b/Demo/tkinter/guido/AttrDialog.py
@@ -155,8 +155,7 @@ class PackDialog(Dialog):
def set(self, e=None):
self.current = self.var.get()
try:
- apply(self.dialog.widget.pack, (),
- {self.option: self.current})
+ self.dialog.widget.pack(**{self.option: self.current})
except TclError, msg:
print msg
self.refresh()
diff --git a/Demo/tkinter/guido/ManPage.py b/Demo/tkinter/guido/ManPage.py
index 7d6fe00..911961e 100755
--- a/Demo/tkinter/guido/ManPage.py
+++ b/Demo/tkinter/guido/ManPage.py
@@ -22,7 +22,7 @@ class EditableManPage(ScrolledText):
# Initialize instance
def __init__(self, master=None, **cnf):
# Initialize base class
- apply(ScrolledText.__init__, (self, master), cnf)
+ ScrolledText.__init__(self, master, **cnf)
# Define tags for formatting styles
self.tag_config('X', underline=1)
@@ -178,7 +178,7 @@ class ReadonlyManPage(EditableManPage):
# Initialize instance
def __init__(self, master=None, **cnf):
cnf['state'] = DISABLED
- apply(EditableManPage.__init__, (self, master), cnf)
+ EditableManPage.__init__(self, master, **cnf)
# Alias
ManPage = ReadonlyManPage
diff --git a/Demo/tkinter/guido/ShellWindow.py b/Demo/tkinter/guido/ShellWindow.py
index 609101b..6cdce0b 100755
--- a/Demo/tkinter/guido/ShellWindow.py
+++ b/Demo/tkinter/guido/ShellWindow.py
@@ -20,7 +20,7 @@ class ShellWindow(ScrolledText):
args = string.split(shell)
shell = args[0]
- apply(ScrolledText.__init__, (self, master), cnf)
+ ScrolledText.__init__(self, master, **cnf)
self.pos = '1.0'
self.bind('<Return>', self.inputhandler)
self.bind('<Control-c>', self.sigint)
diff --git a/Demo/tkinter/guido/kill.py b/Demo/tkinter/guido/kill.py
index e7df261..dd0dbf4 100755
--- a/Demo/tkinter/guido/kill.py
+++ b/Demo/tkinter/guido/kill.py
@@ -9,7 +9,7 @@ import os
class BarButton(Menubutton):
def __init__(self, master=None, **cnf):
- apply(Menubutton.__init__, (self, master), cnf)
+ Menubutton.__init__(self, master, **cnf)
self.pack(side=LEFT)
self.menu = Menu(self, name='menu')
self['menu'] = self.menu
diff --git a/Demo/tkinter/guido/optionmenu.py b/Demo/tkinter/guido/optionmenu.py
index be9d3ac..7365fa6 100644
--- a/Demo/tkinter/guido/optionmenu.py
+++ b/Demo/tkinter/guido/optionmenu.py
@@ -21,7 +21,7 @@ CHOICES = "Aah", "Bee", "Cee", "Dee", "Eff"
var2 = StringVar()
var2.set(CHOICES[0])
-menu2 = apply(OptionMenu, (root, var2) + tuple(CHOICES))
+menu2 = OptionMenu(root, var2, *CHOICES)
menu2.pack()
root.mainloop()
diff --git a/Demo/tkinter/guido/sortvisu.py b/Demo/tkinter/guido/sortvisu.py
index f18f2c1..3e4454f 100644
--- a/Demo/tkinter/guido/sortvisu.py
+++ b/Demo/tkinter/guido/sortvisu.py
@@ -523,8 +523,7 @@ class SortDemo:
if self.size not in sizes:
sizes.append(self.size)
sizes.sort()
- self.m_size = apply(OptionMenu,
- (self.botleftframe, self.v_size) + tuple(sizes))
+ self.m_size = OptionMenu(self.botleftframe, self.v_size, *sizes)
self.m_size.pack(fill=X)
self.v_speed = StringVar(self.master)
diff --git a/Demo/tkinter/guido/svkill.py b/Demo/tkinter/guido/svkill.py
index 69f7f3b..95f61b8 100755
--- a/Demo/tkinter/guido/svkill.py
+++ b/Demo/tkinter/guido/svkill.py
@@ -16,7 +16,7 @@ user = os.environ['LOGNAME']
class BarButton(Menubutton):
def __init__(self, master=None, **cnf):
- apply(Menubutton.__init__, (self, master), cnf)
+ Menubutton.__init__(self, master, **cnf)
self.pack(side=LEFT)
self.menu = Menu(self, name='menu')
self['menu'] = self.menu
@@ -61,7 +61,7 @@ class Kill(Frame):
def do_1(self, e):
self.kill(e.widget.get(e.widget.nearest(e.y)))
def __init__(self, master=None, **cnf):
- apply(Frame.__init__, (self, master), cnf)
+ Frame.__init__(self, master, **cnf)
self.pack(expand=1, fill=BOTH)
self.bar = Frame(self, name='bar', relief=RAISED,
borderwidth=2)