From: Guido van Rossum Date: Fri, 19 Jun 1998 04:35:45 +0000 (+0000) Subject: Turns out that 'winfo id' returns the id as a hex string, with 0x prefix. X-Git-Tag: v1.5.2a1~447 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cef4c844df324979f25ffec172c141a5d5c4672e;p=python Turns out that 'winfo id' returns the id as a hex string, with 0x prefix. The int() function (aliased to getint()) doesn't handle that, so we must use self.tk.getint() again... --- diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index a508d26d12..d7e73cfb4b 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -332,7 +332,7 @@ class Misc: return getint( self.tk.call('winfo', 'height', self._w)) def winfo_id(self): - return getint( + return self.tk.getint( self.tk.call('winfo', 'id', self._w)) def winfo_interps(self, displayof=0): args = ('winfo', 'interps') + self._displayof(displayof)