summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-01-10 10:53:27 (GMT)
committerGitHub <noreply@github.com>2024-01-10 10:53:27 (GMT)
commit7530c612d10030cf9d53e70b1acd333c31a97d7f (patch)
tree40c679a5524f27a09d4b9a6ca8ccf0c0bb1eb73c /Lib/tkinter
parent159e3db1f7697b9aecdf674bb833fbb87f3dcad3 (diff)
downloadcpython-7530c612d10030cf9d53e70b1acd333c31a97d7f.zip
cpython-7530c612d10030cf9d53e70b1acd333c31a97d7f.tar.gz
cpython-7530c612d10030cf9d53e70b1acd333c31a97d7f.tar.bz2
[3.12] gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows (GH-113900) (GH-113901)
winfo_id() converts the result of "winfo id" command to integer, but "winfo pathname" command requires an argument to be a hexadecimal number on Win64. (cherry picked from commit 1b7e0024a16c1820f61c04a8a100498568410afd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index c47c8c2..c551906 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -1181,6 +1181,8 @@ class Misc:
def winfo_pathname(self, id, displayof=0):
"""Return the pathname of the widget given by ID."""
+ if isinstance(id, int):
+ id = hex(id)
args = ('winfo', 'pathname') \
+ self._displayof(displayof) + (id,)
return self.tk.call(args)