From 07e9fbf6b96f6bfab45c3ce860f0c1e27671b59b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 6 Feb 1998 22:35:46 +0000 Subject: [PATCH] Register Tcl_Finalize as a Python exit handler. --- Modules/_tkinter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 59587164f2a6..8d654a14b2f5 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -1543,7 +1543,10 @@ init_tkinter() } if (PyErr_Occurred()) - Py_FatalError("can't initialize module _tkinter"); + return; + + Py_AtExit(Tcl_Finalize); + #ifdef macintosh /* ** Part of this code is stolen from MacintoshInit in tkMacAppInit. -- 2.47.3