[issue40452] Tkinter/IDLE: preserve clipboard on closure

Tal Einat report at bugs.python.org
Tue May 19 16:25:56 EDT 2020


Tal Einat <taleinat+python at gmail.com> added the comment:

Indeed, you've got that pretty much correct. The call chain is:

Tk.__init__
_tkinter_create_impl (called as _tkinter.create() from Python)
Tkapp_New

Tkapp_New does a lot of things. In particular, it calls Tcl_CreateInterp and later Tcl_AppInit. Tcl_AppInit (apparently a local copy is usually  used!) calls Tcl_Init and later Tk_Init.

At this point the call chain enters tcl/tk code. Tk_Init calls Initialize (except on cygwin - I'm ignoring this). The inline comment for Initialize says "The core of the initialization code for Tk, called from Tk_Init and Tk_SafeInit." And at the very end of Initialize, we find the call TkCreateThreadExitHandler(DeleteWindowsExitProc, tsdPtr).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40452>
_______________________________________


More information about the Python-bugs-list mailing list