summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-02-19 21:28:49 (GMT)
committerGuido van Rossum <guido@python.org>1998-02-19 21:28:49 (GMT)
commit1c0d31565d3e8bce6d1a67fe0cdd029492ec973b (patch)
tree92b38ea4d752c77c33d3c293c4b3ed095d3be271 /Modules/_tkinter.c
parent0001a11986a17a94f1bf16df92b57df358d56958 (diff)
downloadcpython-1c0d31565d3e8bce6d1a67fe0cdd029492ec973b.zip
cpython-1c0d31565d3e8bce6d1a67fe0cdd029492ec973b.tar.gz
cpython-1c0d31565d3e8bce6d1a67fe0cdd029492ec973b.tar.bz2
Delete the 'exit' command from the Tcl interpreter -- it would allow
users to exit Python without the normal precautions. (The can do this using os._exit() anyway, but at least that's documented.)
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r--Modules/_tkinter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 8d654a1..d06700d 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -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);