[Python-3000-checkins] r56808 - python/branches/p3yk/Lib/idlelib/run.py

kurt.kaiser python-3000-checkins at python.org
Tue Aug 7 23:15:46 CEST 2007


Author: kurt.kaiser
Date: Tue Aug  7 23:15:45 2007
New Revision: 56808

Modified:
   python/branches/p3yk/Lib/idlelib/run.py
Log:
Replace sys.exitfunc call with atexit call


Modified: python/branches/p3yk/Lib/idlelib/run.py
==============================================================================
--- python/branches/p3yk/Lib/idlelib/run.py	(original)
+++ python/branches/p3yk/Lib/idlelib/run.py	Tue Aug  7 23:15:45 2007
@@ -193,14 +193,16 @@
     """XXX How to do this now?"""
 
 def exit():
-    """Exit subprocess, possibly after first deleting sys.exitfunc
+    """Exit subprocess, possibly after first clearing exit functions.
 
     If config-main.cfg/.def 'General' 'delete-exitfunc' is True, then any
-    sys.exitfunc will be removed before exiting.  (VPython support)
+    functions registered with atexit will be removed before exiting.
+    (VPython support)
 
     """
     if no_exitfunc:
-        del sys.exitfunc
+        import atexit
+        atexit._clear()
     sys.exit(0)
 
 class MyRPCServer(rpc.RPCServer):


More information about the Python-3000-checkins mailing list