[Python-checkins] python/dist/src/Lib/lib-tk Canvas.py,1.18,1.19 Dialog.py,1.5,1.6 ScrolledText.py,1.12,1.13 Tix.py,1.15,1.16 Tkinter.py,1.170,1.171 tkColorChooser.py,1.5,1.6 tkCommonDialog.py,1.6,1.7 tkFont.py,1.3,1.4 tkMessageBox.py,1.1,1.2 tkSimpleDialog.py,1.8,1.9 turtle.py,1.9,1.10
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Sun, 06 Apr 2003 01:01:35 -0800
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory sc8-pr-cvs1:/tmp/cvs-serv1577/Lib/lib-tk
Modified Files:
Canvas.py Dialog.py ScrolledText.py Tix.py Tkinter.py
tkColorChooser.py tkCommonDialog.py tkFont.py tkMessageBox.py
tkSimpleDialog.py turtle.py
Log Message:
SF patch #701494: more apply removals
Index: Canvas.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Canvas.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** Canvas.py 30 Jan 2003 00:56:32 -0000 1.18
--- Canvas.py 6 Apr 2003 09:00:48 -0000 1.19
***************
*** 56,60 ****
flat = ()
for x, y in pts: flat = flat + (x, y)
! return apply(self.canvas.coords, (self.id,) + flat)
def dchars(self, first, last=None):
self.canvas.dchars(self.id, first, last)
--- 56,60 ----
flat = ()
for x, y in pts: flat = flat + (x, y)
! return self.canvas.coords(self.id, *flat)
def dchars(self, first, last=None):
self.canvas.dchars(self.id, first, last)
***************
*** 85,122 ****
class Arc(CanvasItem):
def __init__(self, canvas, *args, **kw):
! apply(CanvasItem.__init__, (self, canvas, 'arc') + args, kw)
class Bitmap(CanvasItem):
def __init__(self, canvas, *args, **kw):
! apply(CanvasItem.__init__, (self, canvas, 'bitmap') + args, kw)
class ImageItem(CanvasItem):
def __init__(self, canvas, *args, **kw):
! apply(CanvasItem.__init__, (self, canvas, 'image') + args, kw)
class Line(CanvasItem):
def __init__(self, canvas, *args, **kw):
! apply(CanvasItem.__init__, (self, canvas, 'line') + args, kw)
class Oval(CanvasItem):
def __init__(self, canvas, *args, **kw):
! apply(CanvasItem.__init__, (self, canvas, 'oval') + args, kw)
class Polygon(CanvasItem):
def __init__(self, canvas, *args, **kw):
! apply(CanvasItem.__init__, (self, canvas, 'polygon') + args,kw)
class Rectangle(CanvasItem):
def __init__(self, canvas, *args, **kw):
! apply(CanvasItem.__init__, (self, canvas, 'rectangle')+args,kw)
# XXX "Text" is taken by the Text widget...
class CanvasText(CanvasItem):
def __init__(self, canvas, *args, **kw):
! apply(CanvasItem.__init__, (self, canvas, 'text') + args, kw)
class Window(CanvasItem):
def __init__(self, canvas, *args, **kw):
! apply(CanvasItem.__init__, (self, canvas, 'window') + args, kw)
class Group:
--- 85,122 ----
class Arc(CanvasItem):
def __init__(self, canvas, *args, **kw):
! CanvasItem.__init__(self, canvas, 'arc', *args, **kw)
class Bitmap(CanvasItem):
def __init__(self, canvas, *args, **kw):
! CanvasItem.__init__(self, canvas, 'bitmap', *args, **kw)
class ImageItem(CanvasItem):
def __init__(self, canvas, *args, **kw):
! CanvasItem.__init__(self, canvas, 'image', *args, **kw)
class Line(CanvasItem):
def __init__(self, canvas, *args, **kw):
! CanvasItem.__init__(self, canvas, 'line', *args, **kw)
class Oval(CanvasItem):
def __init__(self, canvas, *args, **kw):
! CanvasItem.__init__(self, canvas, 'oval', *args, **kw)
class Polygon(CanvasItem):
def __init__(self, canvas, *args, **kw):
! CanvasItem.__init__(self, canvas, 'polygon', *args, **kw)
class Rectangle(CanvasItem):
def __init__(self, canvas, *args, **kw):
! CanvasItem.__init__(self, canvas, 'rectangle', *args, **kw)
# XXX "Text" is taken by the Text widget...
class CanvasText(CanvasItem):
def __init__(self, canvas, *args, **kw):
! CanvasItem.__init__(self, canvas, 'text', *args, **kw)
class Window(CanvasItem):
def __init__(self, canvas, *args, **kw):
! CanvasItem.__init__(self, canvas, 'window', *args, **kw)
class Group:
Index: Dialog.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Dialog.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Dialog.py 23 Oct 2000 18:31:14 -0000 1.5
--- Dialog.py 6 Apr 2003 09:00:49 -0000 1.6
***************
*** 16,24 ****
Widget._setup(self, master, cnf)
self.num = self.tk.getint(
! apply(self.tk.call,
! ('tk_dialog', self._w,
! cnf['title'], cnf['text'],
! cnf['bitmap'], cnf['default'])
! + cnf['strings']))
try: Widget.destroy(self)
except TclError: pass
--- 16,24 ----
Widget._setup(self, master, cnf)
self.num = self.tk.getint(
! self.tk.call(
! 'tk_dialog', self._w,
! cnf['title'], cnf['text'],
! cnf['bitmap'], cnf['default'],
! *cnf['strings']))
try: Widget.destroy(self)
except TclError: pass
Index: ScrolledText.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/ScrolledText.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ScrolledText.py 12 Dec 2001 12:47:57 -0000 1.12
--- ScrolledText.py 6 Apr 2003 09:00:49 -0000 1.13
***************
*** 25,33 ****
fcnf[k] = cnf[k]
del cnf[k]
! self.frame = apply(Frame, (master,), fcnf)
self.vbar = Scrollbar(self.frame, name='vbar')
self.vbar.pack(side=RIGHT, fill=Y)
cnf['name'] = 'text'
! apply(Text.__init__, (self, self.frame), cnf)
self.pack(side=LEFT, fill=BOTH, expand=1)
self['yscrollcommand'] = self.vbar.set
--- 25,33 ----
fcnf[k] = cnf[k]
del cnf[k]
! self.frame = Frame(master, **fcnf)
self.vbar = Scrollbar(self.frame, name='vbar')
self.vbar.pack(side=RIGHT, fill=Y)
cnf['name'] = 'text'
! Text.__init__(self, self.frame, **cnf)
self.pack(side=LEFT, fill=BOTH, expand=1)
self['yscrollcommand'] = self.vbar.set
Index: Tix.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tix.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Tix.py 30 Dec 2002 23:52:00 -0000 1.15
--- Tix.py 6 Apr 2003 09:00:50 -0000 1.16
***************
*** 223,227 ****
def config(self, cnf={}, **kw):
! apply(self.tk.call, ('tixForm', self._w) + self._options(cnf, kw))
form = config
--- 223,227 ----
def config(self, cnf={}, **kw):
! self.tk.call('tixForm', self._w, *self._options(cnf, kw))
form = config
***************
*** 293,297 ****
else:
static_options = ['options']
!
for k,v in cnf.items()[:]:
if k in static_options:
--- 293,297 ----
else:
static_options = ['options']
!
for k,v in cnf.items()[:]:
if k in static_options:
***************
*** 305,309 ****
# corresponding Tk widget has already been created by Tix
if widgetName:
! apply(self.tk.call, (widgetName, self._w) + extra)
# Non-static options - to be done via a 'config' command
--- 305,309 ----
# corresponding Tk widget has already been created by Tix
if widgetName:
! self.tk.call(widgetName, self._w, *extra)
# Non-static options - to be done via a 'config' command
***************
*** 475,480 ****
elif not master: raise RuntimeError, "Too early to create display style: no root window"
self.tk = master.tk
! self.stylename = apply(self.tk.call, ('tixDisplayStyle', itemtype) +
! self._options(cnf,kw) )
def __str__(self):
--- 475,480 ----
elif not master: raise RuntimeError, "Too early to create display style: no root window"
self.tk = master.tk
! self.stylename = self.tk.call('tixDisplayStyle', itemtype,
! *self._options(cnf,kw) )
def __str__(self):
***************
*** 500,505 ****
return _lst2dict(
self.tk.split(
! apply(self.tk.call,
! (self.stylename, 'configure') + self._options(cnf,kw))))
def __getitem__(self,key):
--- 500,505 ----
return _lst2dict(
self.tk.split(
! self.tk.call(
! self.stylename, 'configure', *self._options(cnf,kw))))
def __getitem__(self,key):
***************
*** 533,538 ****
"""Bind balloon widget to another.
One balloon widget may be bound to several widgets at the same time"""
! apply(self.tk.call,
! (self._w, 'bind', widget._w) + self._options(cnf, kw))
def unbind_widget(self, widget):
--- 533,537 ----
"""Bind balloon widget to another.
One balloon widget may be bound to several widgets at the same time"""
! self.tk.call(self._w, 'bind', widget._w, *self._options(cnf, kw))
def unbind_widget(self, widget):
***************
*** 550,555 ****
"""Add a button with given name to box."""
! btn = apply(self.tk.call,
! (self._w, 'add', name) + self._options(cnf, kw))
self.subwidget_list[name] = _dummyButton(self, name)
return btn
--- 549,553 ----
"""Add a button with given name to box."""
! btn = self.tk.call(self._w, 'add', name, *self._options(cnf, kw))
self.subwidget_list[name] = _dummyButton(self, name)
return btn
***************
*** 590,594 ****
# align
!
def add_history(self, str):
self.tk.call(self._w, 'addhistory', str)
--- 588,592 ----
# align
!
def add_history(self, str):
self.tk.call(self._w, 'addhistory', str)
***************
*** 863,874 ****
def add(self, entry, cnf={}, **kw):
! return apply(self.tk.call,
! (self._w, 'add', entry) + self._options(cnf, kw))
def add_child(self, parent=None, cnf={}, **kw):
if not parent:
parent = ''
! return apply(self.tk.call,
! (self._w, 'addchild', parent) + self._options(cnf, kw))
def anchor_set(self, entry):
--- 861,871 ----
def add(self, entry, cnf={}, **kw):
! return self.tk.call(self._w, 'add', entry, *self._options(cnf, kw))
def add_child(self, parent=None, cnf={}, **kw):
if not parent:
parent = ''
! return self.tk.call(
! self._w, 'addchild', parent, *self._options(cnf, kw))
def anchor_set(self, entry):
***************
*** 910,915 ****
def header_create(self, col, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'header', 'create', col) + self._options(cnf, kw))
def header_configure(self, col, cnf={}, **kw):
--- 907,911 ----
def header_create(self, col, cnf={}, **kw):
! self.tk.call(self._w, 'header', 'create', col, *self._options(cnf, kw))
def header_configure(self, col, cnf={}, **kw):
***************
*** 918,923 ****
self.tk.split(
self.tk.call(self._w, 'header', 'configure', col)))
! apply(self.tk.call, (self._w, 'header', 'configure', col)
! + self._options(cnf, kw))
def header_cget(self, col, opt):
--- 914,919 ----
self.tk.split(
self.tk.call(self._w, 'header', 'configure', col)))
! self.tk.call(self._w, 'header', 'configure', col,
! *self._options(cnf, kw))
def header_cget(self, col, opt):
***************
*** 937,942 ****
def indicator_create(self, entry, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'indicator', 'create', entry) + self._options(cnf, kw))
def indicator_configure(self, entry, cnf={}, **kw):
--- 933,938 ----
def indicator_create(self, entry, cnf={}, **kw):
! self.tk.call(
! self._w, 'indicator', 'create', entry, *self._options(cnf, kw))
def indicator_configure(self, entry, cnf={}, **kw):
***************
*** 945,950 ****
self.tk.split(
self.tk.call(self._w, 'indicator', 'configure', entry)))
! apply(self.tk.call,
! (self._w, 'indicator', 'configure', entry) + self._options(cnf, kw))
def indicator_cget(self, entry, opt):
--- 941,946 ----
self.tk.split(
self.tk.call(self._w, 'indicator', 'configure', entry)))
! self.tk.call(
! self._w, 'indicator', 'configure', entry, *self._options(cnf, kw))
def indicator_cget(self, entry, opt):
***************
*** 997,1006 ****
self.tk.split(
self.tk.call(self._w, 'item', 'configure', entry, col)))
! apply(self.tk.call, (self._w, 'item', 'configure', entry, col) +
! self._options(cnf, kw))
def item_create(self, entry, col, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'item', 'create', entry, col) + self._options(cnf, kw))
def item_exists(self, entry, col):
--- 993,1002 ----
self.tk.split(
self.tk.call(self._w, 'item', 'configure', entry, col)))
! self.tk.call(self._w, 'item', 'configure', entry, col,
! *self._options(cnf, kw))
def item_create(self, entry, col, cnf={}, **kw):
! self.tk.call(
! self._w, 'item', 'create', entry, col, *self._options(cnf, kw))
def item_exists(self, entry, col):
***************
*** 1017,1022 ****
def selection_clear(self, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'selection', 'clear') + self._options(cnf, kw))
def selection_includes(self, entry):
--- 1013,1017 ----
def selection_clear(self, cnf={}, **kw):
! self.tk.call(self._w, 'selection', 'clear', *self._options(cnf, kw))
def selection_includes(self, entry):
***************
*** 1030,1037 ****
def xview(self, *args):
! apply(self.tk.call, (self._w, 'xview') + args)
def yview(self, *args):
! apply(self.tk.call, (self._w, 'yview') + args)
class InputOnly(TixWidget):
--- 1025,1032 ----
def xview(self, *args):
! self.tk.call(self._w, 'xview', *args)
def yview(self, *args):
! self.tk.call(self._w, 'yview', *args)
class InputOnly(TixWidget):
***************
*** 1094,1099 ****
def add(self, name, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'add', name) + self._options(cnf, kw))
self.subwidget_list[name] = TixSubWidget(self, name)
return self.subwidget_list[name]
--- 1089,1093 ----
def add(self, name, cnf={}, **kw):
! self.tk.call(self._w, 'add', name, *self._options(cnf, kw))
self.subwidget_list[name] = TixSubWidget(self, name)
return self.subwidget_list[name]
***************
*** 1136,1141 ****
def add(self, name, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'add', name) + self._options(cnf, kw))
self.subwidget_list[name] = TixSubWidget(self, name)
return self.subwidget_list[name]
--- 1130,1134 ----
def add(self, name, cnf={}, **kw):
! self.tk.call(self._w, 'add', name, *self._options(cnf, kw))
self.subwidget_list[name] = TixSubWidget(self, name)
return self.subwidget_list[name]
***************
*** 1181,1190 ****
def add_command(self, name, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'add', 'command', name) + self._options(cnf, kw))
def add_separator(self, name, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'add', 'separator', name) + self._options(cnf, kw))
def delete(self, name):
--- 1174,1181 ----
def add_command(self, name, cnf={}, **kw):
! self.tk.call(self._w, 'add', 'command', name, *self._options(cnf, kw))
def add_separator(self, name, cnf={}, **kw):
! self.tk.call(self._w, 'add', 'separator', name, *self._options(cnf, kw))
def delete(self, name):
***************
*** 1213,1218 ****
# add delete forget panecget paneconfigure panes setsize
def add(self, name, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'add', name) + self._options(cnf, kw))
self.subwidget_list[name] = TixSubWidget(self, name,
check_intermediate=0)
--- 1204,1208 ----
# add delete forget panecget paneconfigure panes setsize
def add(self, name, cnf={}, **kw):
! self.tk.call(self._w, 'add', name, *self._options(cnf, kw))
self.subwidget_list[name] = TixSubWidget(self, name,
check_intermediate=0)
***************
*** 1235,1240 ****
self.tk.split(
self.tk.call(self._w, 'paneconfigure', entry)))
! apply(self.tk.call,
! (self._w, 'paneconfigure', entry) + self._options(cnf, kw))
def panes(self):
--- 1225,1229 ----
self.tk.split(
self.tk.call(self._w, 'paneconfigure', entry)))
! self.tk.call(self._w, 'paneconfigure', entry, *self._options(cnf, kw))
def panes(self):
***************
*** 1362,1367 ****
def add(self, name, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'add', name) + self._options(cnf, kw))
self.subwidget_list[name] = _dummyButton(self, name)
return self.subwidget_list[name]
--- 1351,1355 ----
def add(self, name, cnf={}, **kw):
! self.tk.call(self._w, 'add', name, *self._options(cnf, kw))
self.subwidget_list[name] = _dummyButton(self, name)
return self.subwidget_list[name]
***************
*** 1459,1464 ****
def insert(self, index, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'insert', index) + self._options(cnf, kw))
def info_active(self):
--- 1447,1451 ----
def insert(self, index, cnf={}, **kw):
! self.tk.call(self._w, 'insert', index, *self._options(cnf, kw))
def info_active(self):
***************
*** 1494,1499 ****
def selection_clear(self, cnf={}, **kw):
! apply(self.tk.call,
! (self._w, 'selection', 'clear') + self._options(cnf, kw))
def selection_includes(self, index):
--- 1481,1485 ----
def selection_clear(self, cnf={}, **kw):
! self.tk.call(self._w, 'selection', 'clear', *self._options(cnf, kw))
def selection_includes(self, index):
***************
*** 1504,1511 ****
def xview(self, *args):
! apply(self.tk.call, (self._w, 'xview') + args)
def yview(self, *args):
! apply(self.tk.call, (self._w, 'yview') + args)
class Tree(TixWidget):
--- 1490,1497 ----
def xview(self, *args):
! self.tk.call(self._w, 'xview', *args)
def yview(self, *args):
! self.tk.call(self._w, 'yview', *args)
class Tree(TixWidget):
***************
*** 1808,1812 ****
# def xview
# def yview
!
class ScrolledGrid(TixWidget):
'''Scrolled Grid widgets'''
--- 1794,1798 ----
# def xview
# def yview
!
class ScrolledGrid(TixWidget):
'''Scrolled Grid widgets'''
Index: Tkinter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v
retrieving revision 1.170
retrieving revision 1.171
diff -C2 -d -r1.170 -r1.171
*** Tkinter.py 29 Mar 2003 09:47:21 -0000 1.170
--- Tkinter.py 6 Apr 2003 09:00:51 -0000 1.171
***************
*** 5,12 ****
widgets are Frame, Label, Entry, Text, Canvas, Button, Radiobutton,
Checkbutton, Scale, Listbox, Scrollbar, OptionMenu, Spinbox
! LabelFrame and PanedWindow.
! Properties of the widgets are specified with keyword arguments.
! Keyword arguments have the same name as the corresponding resource
under Tk.
--- 5,12 ----
widgets are Frame, Label, Entry, Text, Canvas, Button, Radiobutton,
[...1265 lines suppressed...]
! Style is a string that contains zero or more of the
! characters n, s, e or w. The string can optionally
! contains spaces or commas, but they are ignored. Each
! letter refers to a side (north, south, east, or west)
! that the window will "stick" to. If both n and s
! (or e and w) are specified, the window will be
! stretched to fill the entire height (or width) of
its cavity.
width size
! Specify a width for the window. The width will be
! the outer dimension of the window including its
! border, if any. If size is an empty string, or
if -width is not specified, then the width requested
! internally by the window will be used initially; the
! width may later be adjusted by the movement of sashes
! in the panedwindow. Size may be any value accepted by
Tk_GetPixels.
!
"""
if cnf is None and not kw:
Index: tkColorChooser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/tkColorChooser.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** tkColorChooser.py 16 Jul 2000 12:04:31 -0000 1.5
--- tkColorChooser.py 6 Apr 2003 09:00:52 -0000 1.6
***************
*** 64,68 ****
options["initialcolor"] = color
! return apply(Chooser, (), options).show()
--- 64,68 ----
options["initialcolor"] = color
! return Chooser(**options).show()
Index: tkCommonDialog.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/tkCommonDialog.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** tkCommonDialog.py 16 Feb 2002 23:16:53 -0000 1.6
--- tkCommonDialog.py 6 Apr 2003 09:00:53 -0000 1.7
***************
*** 50,54 ****
try:
! s = apply(w.tk.call, (self.command,) + w._options(self.options))
s = self._fixresult(w, s)
--- 50,54 ----
try:
! s = w.tk.call(self.command, *w._options(self.options))
s = self._fixresult(w, s)
Index: tkFont.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/tkFont.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tkFont.py 9 Feb 2001 11:17:58 -0000 1.3
--- tkFont.py 6 Apr 2003 09:00:53 -0000 1.4
***************
*** 74,78 ****
name = "font" + str(id(self))
self.name = name
! apply(root.tk.call, ("font", "create", name) + font)
# backlinks!
self._root = root
--- 74,78 ----
name = "font" + str(id(self))
self.name = name
! root.tk.call("font", "create", name, *font)
# backlinks!
self._root = root
***************
*** 91,95 ****
def copy(self):
"Return a distinct copy of the current font"
! return apply(Font, (self._root,), self.actual())
def actual(self, option=None):
--- 91,95 ----
def copy(self):
"Return a distinct copy of the current font"
! return Font(self._root, **self.actual())
def actual(self, option=None):
***************
*** 109,114 ****
"Modify font attributes"
if options:
! apply(self._call, ("font", "config", self.name) +
! self._set(options))
else:
return self._mkdict(
--- 109,114 ----
"Modify font attributes"
if options:
! self._call("font", "config", self.name,
! *self._set(options))
else:
return self._mkdict(
Index: tkMessageBox.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/tkMessageBox.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** tkMessageBox.py 19 Jul 1997 20:02:36 -0000 1.1
--- tkMessageBox.py 6 Apr 2003 09:00:54 -0000 1.2
***************
*** 73,107 ****
if title: options["title"] = title
if message: options["message"] = message
! return apply(Message, (), options).show()
def showinfo(title=None, message=None, **options):
"Show an info message"
! return apply(_show, (title, message, INFO, OK), options)
def showwarning(title=None, message=None, **options):
"Show a warning message"
! return apply(_show, (title, message, WARNING, OK), options)
def showerror(title=None, message=None, **options):
"Show an error message"
! return apply(_show, (title, message, ERROR, OK), options)
def askquestion(title=None, message=None, **options):
"Ask a question"
! return apply(_show, (title, message, QUESTION, YESNO), options)
def askokcancel(title=None, message=None, **options):
"Ask if operation should proceed; return true if the answer is ok"
! s = apply(_show, (title, message, QUESTION, OKCANCEL), options)
return s == OK
def askyesno(title=None, message=None, **options):
"Ask a question; return true if the answer is yes"
! s = apply(_show, (title, message, QUESTION, YESNO), options)
return s == YES
def askretrycancel(title=None, message=None, **options):
"Ask if operation should be retried; return true if the answer is yes"
! s = apply(_show, (title, message, WARNING, RETRYCANCEL), options)
return s == RETRY
--- 73,107 ----
if title: options["title"] = title
if message: options["message"] = message
! return Message(**options).show()
def showinfo(title=None, message=None, **options):
"Show an info message"
! return _show(title, message, INFO, OK, **options)
def showwarning(title=None, message=None, **options):
"Show a warning message"
! return _show(title, message, WARNING, OK, **options)
def showerror(title=None, message=None, **options):
"Show an error message"
! return _show(title, message, ERROR, OK, **options)
def askquestion(title=None, message=None, **options):
"Ask a question"
! return _show(title, message, QUESTION, YESNO, **options)
def askokcancel(title=None, message=None, **options):
"Ask if operation should proceed; return true if the answer is ok"
! s = _show(title, message, QUESTION, OKCANCEL, **options)
return s == OK
def askyesno(title=None, message=None, **options):
"Ask a question; return true if the answer is yes"
! s = _show(title, message, QUESTION, YESNO, **options)
return s == YES
def askretrycancel(title=None, message=None, **options):
"Ask if operation should be retried; return true if the answer is yes"
! s = _show(title, message, WARNING, RETRYCANCEL, **options)
return s == RETRY
Index: tkSimpleDialog.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/tkSimpleDialog.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** tkSimpleDialog.py 6 Dec 2001 16:51:41 -0000 1.8
--- tkSimpleDialog.py 6 Apr 2003 09:00:54 -0000 1.9
***************
*** 250,254 ****
Return value is an integer
'''
! d = apply(_QueryInteger, (title, prompt), kw)
return d.result
--- 250,254 ----
Return value is an integer
'''
! d = _QueryInteger(title, prompt, **kw)
return d.result
***************
*** 269,273 ****
Return value is a float
'''
! d = apply(_QueryFloat, (title, prompt), kw)
return d.result
--- 269,273 ----
Return value is a float
'''
! d = _QueryFloat(title, prompt, **kw)
return d.result
***************
*** 301,305 ****
Return value is a string
'''
! d = apply(_QueryString, (title, prompt), kw)
return d.result
--- 301,305 ----
Return value is a string
'''
! d = _QueryString(title, prompt, **kw)
return d.result
Index: turtle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/turtle.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** turtle.py 29 Sep 2002 00:25:51 -0000 1.9
--- turtle.py 6 Apr 2003 09:00:58 -0000 1.10
***************
*** 355,363 ****
def down(): _getpen().down()
def width(width): _getpen().width(width)
! def color(*args): apply(_getpen().color, args)
def write(arg, move=0): _getpen().write(arg, move)
def fill(flag): _getpen().fill(flag)
def circle(radius, extent=None): _getpen().circle(radius, extent)
! def goto(*args): apply(_getpen().goto, args)
def heading(): return _getpen().heading()
def setheading(angle): _getpen().setheading(angle)
--- 355,363 ----
def down(): _getpen().down()
def width(width): _getpen().width(width)
! def color(*args): _getpen().color(*args)
def write(arg, move=0): _getpen().write(arg, move)
def fill(flag): _getpen().fill(flag)
def circle(radius, extent=None): _getpen().circle(radius, extent)
! def goto(*args): _getpen().goto(*args)
def heading(): return _getpen().heading()
def setheading(angle): _getpen().setheading(angle)