aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-01-10 12:36:03 +0200
committerGitHub <noreply@github.com>2024-01-10 12:36:03 +0200
commit1b7e0024a16c1820f61c04a8a100498568410afd (patch)
treed8c95f65e9ab7081fb50a7d62472b5c0a6816691 /Lib/tkinter
parent5d384b0468b35b393f8ae2d3149d13ff607c9501 (diff)
downloadcpython-1b7e0024a16c1820f61c04a8a100498568410afd.tar.gz
cpython-1b7e0024a16c1820f61c04a8a100498568410afd.zip
gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows (GH-113900)
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.
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 124882420c2..2590acdc87e 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -1260,6 +1260,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)