summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-07-11 15:21:31 (GMT)
committerGuido van Rossum <guido@python.org>1994-07-11 15:21:31 (GMT)
commit69170c5d797404d440d61a89230f8f57fa9353b8 (patch)
tree231e0f73f64d17c4ec864c29198d0a8b0703daf2 /Lib/tkinter
parent36ea0e760e50c113f5c525c4232d0c76b12a46fd (diff)
downloadcpython-69170c5d797404d440d61a89230f8f57fa9353b8.zip
cpython-69170c5d797404d440d61a89230f8f57fa9353b8.tar.gz
cpython-69170c5d797404d440d61a89230f8f57fa9353b8.tar.bz2
Make Pack.newinfo() return a dict
Diffstat (limited to 'Lib/tkinter')
-rwxr-xr-xLib/tkinter/Tkinter.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py
index c05704e..d0d93ed 100755
--- a/Lib/tkinter/Tkinter.py
+++ b/Lib/tkinter/Tkinter.py
@@ -552,7 +552,16 @@ class Pack:
def forget(self):
self.tk.call('pack', 'forget', self._w)
def newinfo(self):
- return self.tk.call('pack', 'newinfo', self._w)
+ words = self.tk.splitlist(
+ self.tk.call('pack', 'newinfo', self._w))
+ dict = {}
+ for i in range(0, len(words), 2):
+ key = words[i][1:]
+ value = words[i+1]
+ if value[0] == '.':
+ value = self._nametowidget(value)
+ dict[key] = value
+ return dict
info = newinfo
def propagate(self, boolean=None):
if boolean: