mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
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.
This commit is contained in:
parent
5d384b0468
commit
1b7e0024a1
3 changed files with 15 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue