Tal Einat <taleinat+pyt...@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 <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