atexit
index
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py
Module Docs

atexit.py - allow programmer to define multiple exit functions to be executed
upon normal program termination.
 
One public function, register, is defined.

 
Modules
       
sys

 
Functions
       
register(func, *targs, **kargs)
register a function to be executed upon normal program termination
 
func - function to be called at exit
targs - optional arguments to pass to func
kargs - optional keyword arguments to pass to func
 
func is returned to facilitate usage as a decorator.

 
Data
        __all__ = ['register']