Terry J. Reedy <tjre...@udel.edu> added the comment:
Zain, what I understand is: > python3.8 -m idlelib # To open idle from Terminal In IDLE, File=>New, then File=>SaveAs In dialog opened to Documents, enter name in Save As box, then click Save. For me 2012? Macbook Air with 10.14.6? Mohave and 3.8.3rc1, dialog disappears and the (blank) file is saved, with a confirmation dialog if name exits. For you, the Documents name list disappears and maybe something else (or vice versa) and the dialog freezes. I presume keys and clicks have no effect. The freezing itself is almost certainly an issue between macOS and tcl/tk 8.6.8. If you start IDLE in Terminal, does anything error message appear? The relevant IDLE code is idlelib.iomenu.IOBInding.asksavefile, which creates an instance of tkinter.filedialog.SaveAs and calls its show method, inherited from tkinter.commondialog.CommonDialog. The important line there is 's = w.tk.call(self.command, <options>)', where the save as command is 'tk_getSaveFile'. This tk command is documented in https://www.tcl.tk/man/tcl8.6/TkCmd/getOpenFile.htm. There are Mac-specific items but nothing jumped out at me as significant for this issue. To debug, and test Raymond's hypothesis, someone please try this minimal (IDLE-free) code to show the dialog and print the return. (Interactive should work, at least on IDLE.) import tkinter as tk r = tk.Tk() print(r.tk.call('tk_getSaveFile')) This does not display a preview, even after selecting a location, such as Documents, on the 3rd line. If that works, try deleting the 'dir' option in the .show call. Other options in the SaveAs and show calls could be experimentally deleted if needed. If something works, we could use platform.mac_ver()[0].split('.')[1] to detect Catalina and switch to the workaround. ---------- versions: +Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40553> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com