Index: atexit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/atexit.py,v retrieving revision 1.7 diff -u -r1.7 atexit.py --- atexit.py 12 Feb 2004 17:35:05 -0000 1.7 +++ atexit.py 21 Sep 2004 05:52:01 -0000 @@ -28,6 +28,14 @@ """ _exithandlers.append((func, targs, kargs)) +def atexit(*targs, **kargs): + """Create a function decorator that registers an exit function + to be run the supplied args upon normal program termination""" + def deco(func): + register(func, *targs, **kargs) + return func + return deco + import sys if hasattr(sys, "exitfunc"): # Assume it's another registered exit function - append it to our list