summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-07-30 16:31:32 (GMT)
committerGuido van Rossum <guido@python.org>1996-07-30 16:31:32 (GMT)
commitc8b4791d9e632cd0f05f1441ab2fe2749402f6f7 (patch)
tree7b3ed4843490d9ec2a8aa3e9288d372bccc86483 /Lib/tkinter
parent8d12a1bcbcee483671bfe7d566a3412f57fa8b58 (diff)
downloadcpython-c8b4791d9e632cd0f05f1441ab2fe2749402f6f7.zip
cpython-c8b4791d9e632cd0f05f1441ab2fe2749402f6f7.tar.gz
cpython-c8b4791d9e632cd0f05f1441ab2fe2749402f6f7.tar.bz2
Two independent changes:
- accept empty string from focus_get - map coords() return value through getdouble and splitlist
Diffstat (limited to 'Lib/tkinter')
-rwxr-xr-xLib/tkinter/Tkinter.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py
index ac814a9..0cff594 100755
--- a/Lib/tkinter/Tkinter.py
+++ b/Lib/tkinter/Tkinter.py
@@ -167,7 +167,7 @@ class Misc:
self.tk.call('focus', 'none')
def focus_get(self):
name = self.tk.call('focus')
- if name == 'none': return None
+ if name == 'none' or not Name: return None
return self._nametowidget(name)
def tk_focusNext(self):
name = self.tk.call('tk_focusNext', self._w)
@@ -963,7 +963,8 @@ class Canvas(Widget):
return self.tk.getdouble(self.tk.call(
self._w, 'canvasy', screeny, gridspacing))
def coords(self, *args):
- return self._do('coords', args)
+ return map(self.tk.getdouble,
+ self.tk.splitlist(self._do('coords', args))
def _create(self, itemType, args, kw): # Args: (val, val, ..., cnf={})
args = _flatten(args)
cnf = args[-1]