This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author epaine
Recipients epaine, eryksun, taleinat, terry.reedy
Date 2020-05-20.13:51:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589982672.26.0.147894485792.issue40452@roundup.psfhosted.org>
In-reply-to
Content
After some initial testing, I have found that while calling Tcl_Finalize  on window closure keeps the clipboard contents (as expected), it also finishes the Python interpreter.

The solution was to instead use the Tcl_FinalizeThread method, "which you can call if you just want to clean up per-thread state" (https://www.tcl.tk/man/tcl8.4/TclLib/Exit.htm).

Reading this, I was expecting it to stop further Tk instances from being created after the original one was closed, however some initial testing has found this to not be true.

I feel it is too early to create a PR for this yet (I need to do more research and properly understand the calls), but it is quite possible calling this method on root "destroy" is the only thing required to fix this issue.
History
Date User Action Args
2020-05-20 13:51:12epainesetrecipients: + epaine, terry.reedy, taleinat, eryksun
2020-05-20 13:51:12epainesetmessageid: <1589982672.26.0.147894485792.issue40452@roundup.psfhosted.org>
2020-05-20 13:51:12epainelinkissue40452 messages
2020-05-20 13:51:12epainecreate