Made Place.info == Pack.info

This commit is contained in:
Guido van Rossum 1996-05-16 17:53:48 +00:00
parent a5f875f504
commit 63e39ae933
2 changed files with 20 additions and 2 deletions

View File

@ -704,7 +704,16 @@ class Place:
self.tk.call('place', 'forget', self._w)
place_forget = forget
def info(self):
return self.tk.call('place', 'info', self._w)
words = self.tk.splitlist(
self.tk.call('place', 'info', self._w))
dict = {}
for i in range(0, len(words), 2):
key = words[i][1:]
value = words[i+1]
if value[:1] == '.':
value = self._nametowidget(value)
dict[key] = value
return dict
place_info = info
def slaves(self):
return map(self._nametowidget,

View File

@ -704,7 +704,16 @@ class Place:
self.tk.call('place', 'forget', self._w)
place_forget = forget
def info(self):
return self.tk.call('place', 'info', self._w)
words = self.tk.splitlist(
self.tk.call('place', 'info', self._w))
dict = {}
for i in range(0, len(words), 2):
key = words[i][1:]
value = words[i+1]
if value[:1] == '.':
value = self._nametowidget(value)
dict[key] = value
return dict
place_info = info
def slaves(self):
return map(self._nametowidget,