summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-10-18 22:06:38 (GMT)
committerGuido van Rossum <guido@python.org>1999-10-18 22:06:38 (GMT)
commitf8d8e07601d06e709000429f3b504a0e5a0963bf (patch)
treec59264bafe38eb1c6ca295802b7975c7c1234b5a /Lib/lib-tk
parentdcb8583c180bc9c477f58f77166dc2abbccadc11 (diff)
downloadcpython-f8d8e07601d06e709000429f3b504a0e5a0963bf.zip
cpython-f8d8e07601d06e709000429f3b504a0e5a0963bf.tar.gz
cpython-f8d8e07601d06e709000429f3b504a0e5a0963bf.tar.bz2
Fixed PR#106: winfo_visualsavailable() with the includeids=1 option
didn't properly handle the hex numbers returned.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 7674591..c687669 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -423,9 +423,11 @@ class Misc:
data = self.tk.split(
self.tk.call('winfo', 'visualsavailable', self._w,
includeids and 'includeids' or None))
- def parseitem(x, self=self):
- return x[:1] + tuple(map(getint, x[1:]))
- return map(parseitem, data)
+ return map(self.__winfo_parseitem, data)
+ def __winfo_parseitem(self, t):
+ return t[:1] + tuple(map(self.__winfo_getint, t[1:]))
+ def __winfo_getint(self, x):
+ return _string.atoi(x, 0)
def winfo_vrootheight(self):
return getint(
self.tk.call('winfo', 'vrootheight', self._w))