Terry J. Reedy <tjre...@udel.edu> added the comment:
After hours of failure to understand crazy 'impossible' behavior, I went back to 'timing issue' and this code. def run_module_event(self, event): if macosx.isCocoaTk(): # Tk-Cocoa in MacOSX is broken until at least # Tk 8.5.9, and without this rather # crude workaround IDLE would hang when a user # tries to run a module using the keyboard shortcut # (the menu item works fine). self.editwin.text_frame.after(200, lambda: self.editwin.text_frame.event_generate( '<<run-module-event-2>>')) return 'break' else: return self._run_module_event(event) When I used the Run menu instead of F5, the problem went away. The problem also went away when I added 'and 0' to the condition above to disable the workaround. 3.8 also works fine with the workaround disabled. Ned, if you verify enough to agree, I will get rid of the wrapper and remove the leading '_' from the real handler. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42508> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com