[Python-checkins] r65399 - in python/trunk: Lib/lib-tk/Tkinter.py Misc/NEWS
martin.v.loewis
python-checkins at python.org
Sat Aug 2 09:20:25 CEST 2008
Author: martin.v.loewis
Date: Sat Aug 2 09:20:25 2008
New Revision: 65399
Log:
Issue #799428: Fix Tkinter.Misc._nametowidget to unwrap
Tcl command objects.
Modified:
python/trunk/Lib/lib-tk/Tkinter.py
python/trunk/Misc/NEWS
Modified: python/trunk/Lib/lib-tk/Tkinter.py
==============================================================================
--- python/trunk/Lib/lib-tk/Tkinter.py (original)
+++ python/trunk/Lib/lib-tk/Tkinter.py Sat Aug 2 09:20:25 2008
@@ -1066,18 +1066,18 @@
def nametowidget(self, name):
"""Return the Tkinter instance of a widget identified by
its Tcl name NAME."""
+ name = str(name).split('.')
w = self
- if name[0] == '.':
+
+ if not name[0]:
w = w._root()
name = name[1:]
- while name:
- i = name.find('.')
- if i >= 0:
- name, tail = name[:i], name[i+1:]
- else:
- tail = ''
- w = w.children[name]
- name = tail
+
+ for n in name:
+ if not n:
+ break
+ w = w.children[n]
+
return w
_nametowidget = nametowidget
def _register(self, func, subst=None, needcleanup=1):
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Sat Aug 2 09:20:25 2008
@@ -139,6 +139,8 @@
Library
-------
+- Issue #799428: Fix Tkinter.Misc._nametowidget to unwrap Tcl command objects.
+
- Issue #3395: fix reference in test_multiprocessing to old debugInfo method
- Issue #3312: Fix two crashes in sqlite3.
More information about the Python-checkins
mailing list