Tal Einat <taleinat+pyt...@gmail.com> added the comment:
Okay, so it appears that a generic solution for tkinter is non-trivial, as it is not clear when to call Tcl_Finalize() or Tcl_FinalizeThread(). However, giving tkinter apps the ability to call those when appropriate is possible. Exposing a thin wrapper around Tcl_Finalize in _tkinter, and making IDLE call that when exiting, resolves the clipboard preservation issue. For some reason, calling Tcl_Finalize causes a memory segmentation issue for me on Ubuntu 20.04. However, calling Tcl_FinalizeThread also resolves the clipboard issue without causing problems. On Windows 10, calling either function works. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40452> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com