]> granicus.if.org Git - python/commitdiff
Delete the 'exit' command from the Tcl interpreter -- it would allow
authorGuido van Rossum <guido@python.org>
Thu, 19 Feb 1998 21:28:49 +0000 (21:28 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 19 Feb 1998 21:28:49 +0000 (21:28 +0000)
users to exit Python without the normal precautions.  (The can do this
using os._exit() anyway, but at least that's documented.)

Modules/_tkinter.c

index 8d654a14b2f5c4b1ba62a82b94c0b64d247aa2e7..d06700d7686f582ae0e14c8867291f6f22adcac4 100644 (file)
@@ -337,6 +337,9 @@ Tkapp_New(screenName, baseName, className, interactive)
 
        v->interp = Tcl_CreateInterp();
 
+       /* Delete the 'exit' command, which can screw things up */
+       Tcl_DeleteCommand(v->interp, "exit");
+
        if (screenName != NULL)
                Tcl_SetVar2(v->interp, "env", "DISPLAY",
                            screenName, TCL_GLOBAL_ONLY);