[issue37693] IDLE/Tkinter: File names are hidden in "Open" menu (Linux)
Terry J. Reedy
report at bugs.python.org
Sat Jul 27 16:16:53 EDT 2019
Terry J. Reedy <tjreedy at udel.edu> added the comment:
This is definitely not an IDLE issue. To open files, IDLE calls tkinter.filedialog.Open(parent, filetypes).show(initial_dir, initial_file). Open is a subclass of filedialog._Dialog(commondialog.Dialog). It sets command = "tk_getOpenFile". Dialog.show calls the command with root.tk.call after fixing passed in options. It then fixes the result and returns it. I believe this command calls the native file dialog. Since tkinter's option processing, converting python object to strings suitable for tk.call, is OS independent, I presume the problem is in tk_getOpenFile. I suspect tcl/tk developers have trouble keeping up with the parade linuxes and window managers. (What is a 'DE?)
If so, this should be closed as 3rd party. If you want to test first, bypass IDLE and most of tkinter with the following, run directly in Python.
>>> import tkinter as tk
>>> r = tk.Tk()
>>> r.tk.call("tk_getOpenFile") # select codecontext.py, hit 'Open'
'C:/Programs/Python38/Lib/idlelib/codecontext.py'
>>> r.tk.call("tk_getOpenFile") # hit 'Cancel'
''
----------
assignee: terry.reedy ->
components: +Tkinter -IDLE
nosy: +serhiy.storchaka
title: IDLE: File names are hidden in "Open" menu (Linux) -> IDLE/Tkinter: File names are hidden in "Open" menu (Linux)
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37693>
_______________________________________
More information about the Python-bugs-list
mailing list