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 taleinat
Recipients epaine, eryksun, taleinat, terry.reedy
Date 2020-05-19.20:25:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589919956.96.0.645852238874.issue40452@roundup.psfhosted.org>
In-reply-to
Content
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).
History
Date User Action Args
2020-05-19 20:25:57taleinatsetrecipients: + taleinat, terry.reedy, eryksun, epaine
2020-05-19 20:25:56taleinatsetmessageid: <1589919956.96.0.645852238874.issue40452@roundup.psfhosted.org>
2020-05-19 20:25:56taleinatlinkissue40452 messages
2020-05-19 20:25:56taleinatcreate