[Python-checkins] r67276 - sandbox/trunk/tkinter-polo/src/Tkinter.py
guilherme.polo
python-checkins at python.org
Wed Nov 19 00:53:20 CET 2008
Author: guilherme.polo
Date: Wed Nov 19 00:53:19 2008
New Revision: 67276
Log:
Removed some dead code
Modified:
sandbox/trunk/tkinter-polo/src/Tkinter.py
Modified: sandbox/trunk/tkinter-polo/src/Tkinter.py
==============================================================================
--- sandbox/trunk/tkinter-polo/src/Tkinter.py (original)
+++ sandbox/trunk/tkinter-polo/src/Tkinter.py Wed Nov 19 00:53:19 2008
@@ -391,9 +391,6 @@
disabledForeground, insertBackground, troughColor."""
self.tk.call(('tk_setPalette',)
+ _flatten(args) + _flatten(kw.items()))
- def tk_menuBar(self, *args):
- """Do not use. Needed in Tk 3.6 and earlier."""
- pass # obsolete since Tk 4.0
def wait_variable(self, name='PY_VAR'):
"""Wait until the variable is modified.
@@ -676,9 +673,6 @@
"""Raise this widget in the stacking order."""
self.tk.call('raise', self._w, aboveThis)
lift = tkraise
- def colormodel(self, value=None):
- """Useless. Not implemented in Tk."""
- return self.tk.call('tk', 'colormodel', self._w, value)
def winfo_atom(self, name, displayof=0):
"""Return integer which represents atom NAME."""
args = ('winfo', 'atom') + self._displayof(displayof) + (name,)
@@ -1185,7 +1179,6 @@
return (e,)
def _report_exception(self):
"""Internal function."""
- import sys
exc, val, tb = sys.exc_type, sys.exc_value, sys.exc_traceback
root = self._root()
root.report_callback_exception(exc, val, tb)
@@ -1650,7 +1643,7 @@
# ensure that self.tk is always _something_.
self.tk = None
if baseName is None:
- import sys, os
+ import os
baseName = os.path.basename(sys.argv[0])
baseName, ext = os.path.splitext(baseName)
if ext not in ('.py', '.pyc', '.pyo'):
@@ -2013,21 +2006,6 @@
"""
Widget.__init__(self, master, 'button', cnf, kw)
- def tkButtonEnter(self, *dummy):
- self.tk.call('tkButtonEnter', self._w)
-
- def tkButtonLeave(self, *dummy):
- self.tk.call('tkButtonLeave', self._w)
-
- def tkButtonDown(self, *dummy):
- self.tk.call('tkButtonDown', self._w)
-
- def tkButtonUp(self, *dummy):
- self.tk.call('tkButtonUp', self._w)
-
- def tkButtonInvoke(self, *dummy):
- self.tk.call('tkButtonInvoke', self._w)
-
def flash(self):
"""Flash the button.
@@ -2050,24 +2028,6 @@
"""
return self.tk.call(self._w, 'invoke')
-# Indices:
-# XXX I don't like these -- take them away
-def AtEnd():
- return 'end'
-def AtInsert(*args):
- s = 'insert'
- for a in args:
- if a: s = s + (' ' + a)
- return s
-def AtSelFirst():
- return 'sel.first'
-def AtSelLast():
- return 'sel.last'
-def At(x, y=None):
- if y is None:
- return '@%r' % (x,)
- else:
- return '@%r,%r' % (x, y)
class Canvas(Widget):
"""Canvas widget to display graphical elements like lines or text."""
@@ -2614,28 +2574,6 @@
disabledforeground, fg, font, foreground, postcommand, relief,
selectcolor, takefocus, tearoff, tearoffcommand, title, type."""
Widget.__init__(self, master, 'menu', cnf, kw)
- def tk_bindForTraversal(self):
- pass # obsolete since Tk 4.0
- def tk_mbPost(self):
- self.tk.call('tk_mbPost', self._w)
- def tk_mbUnpost(self):
- self.tk.call('tk_mbUnpost')
- def tk_traverseToMenu(self, char):
- self.tk.call('tk_traverseToMenu', self._w, char)
- def tk_traverseWithinMenu(self, char):
- self.tk.call('tk_traverseWithinMenu', self._w, char)
- def tk_getMenuButtons(self):
- return self.tk.call('tk_getMenuButtons', self._w)
- def tk_nextMenu(self, count):
- self.tk.call('tk_nextMenu', count)
- def tk_nextMenuEntry(self, count):
- self.tk.call('tk_nextMenuEntry', count)
- def tk_invokeMenu(self):
- self.tk.call('tk_invokeMenu', self._w)
- def tk_firstMenu(self):
- self.tk.call('tk_firstMenu', self._w)
- def tk_mbButtonDown(self):
- self.tk.call('tk_mbButtonDown', self._w)
def tk_popup(self, x, y, entry=""):
"""Post the menu at position X,Y with entry ENTRY."""
self.tk.call('tk_popup', self._w, x, y, entry)
@@ -2868,14 +2806,6 @@
box of the visible part of the character at the index in ARGS."""
return self._getints(
self.tk.call((self._w, 'bbox') + args)) or None
- def tk_textSelectTo(self, index):
- self.tk.call('tk_textSelectTo', self._w, index)
- def tk_textBackspace(self):
- self.tk.call('tk_textBackspace', self._w)
- def tk_textIndexCloser(self, a, b, c):
- self.tk.call('tk_textIndexCloser', self._w, a, b, c)
- def tk_textResetAnchor(self, index):
- self.tk.call('tk_textResetAnchor', self._w, index)
def compare(self, index1, op, index2):
"""Return whether between index INDEX1 and index INDEX2 the
relation OP is satisfied. OP is one of <, <=, ==, >=, >, or !=."""
More information about the Python-checkins
mailing list