Home | Trees | Indices | Help |
---|
|
Extend the behaviour of the default *atexit* module to support: 1) automatically catching of the (possible) exceptions thrown by exit function 2) exit function prioritization (lower value means higher priority) E.g: import atexit atexit.register((<PRIORITY>,myfunc),args) The backward-compatibility is kept so the existing code using : import atexit atexit.register(myfunc,args) registers the function with the lowest priority (sys.maxint)
|
|||
|
|||
|
|
|||
logger = getLogger()
|
|||
__package__ =
|
|
run any registered exit functions atexit._exithandlers is traversed based on the priority. If no priority was registered for a given function than the lowest priority is assumed (LIFO policy) We keep the same functionality as in *atexit* bare module but we run each exit handler inside a try..catch block to be sure all the registered handlers are executed |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Jun 25 10:35:15 2012 | http://epydoc.sourceforge.net |