Module Expr Str Import alias Import alias Assign NameStore ListLoad Str Str Assign NameStore ListLoad FunctionDef arguments args defaults body Expr Str Assign NameStore NameLoad While NameLoad body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr TryExcept body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad NameLoad attr ExceptHandler body Import alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Raise Call SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str If Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareEq SubscriptLoad NameLoad Index Num NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list If UnaryOpNot Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad
N/A N/A Uses the old atexit with added unregister for python 2.x
and the new atexit for python 3.x
 N/A sys N/A atexit N/A __all__ N/A register unregister N/A _exithandlers N/A _run_exitfuncs N/A N/A N/A N/A N/A run any registered exit functions

    _exithandlers is traversed in reverse order so functions are executed
    last in, first out.
     N/A exc_info None N/A _exithandlers N/A N/A N/A func targs kargs N/A N/A _exithandlers pop N/A N/A N/A N/A func targs kargs N/A N/A N/A SystemExit N/A N/A exc_info N/A N/A sys exc_info N/A N/A N/A traceback N/A N/A N/A N/A sys stderr write Error in atexit._run_exitfuncs:
 N/A N/A N/A traceback print_exc N/A exc_info N/A N/A sys exc_info N/A N/A exc_info None N/A N/A N/A N/A exc_info N/A 0 N/A exc_info N/A 1 N/A register N/A N/A func N/A targs kargs N/A N/A 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.
     N/A N/A hasattr atexit unregister N/A N/A N/A N/A atexit register func targs kargs N/A N/A N/A N/A _exithandlers append N/A func targs kargs N/A func N/A unregister N/A N/A func N/A N/A N/A remove func from the list of functions that are registered
    doesn't do anything if func is not found

    func = function to be unregistered
     N/A N/A hasattr atexit unregister N/A N/A N/A N/A atexit unregister func N/A N/A handler_entries N/A e N/A e _exithandlers N/A N/A e N/A 0 func N/A e handler_entries N/A N/A N/A N/A _exithandlers remove e N/A N/A N/A N/A hasattr atexit unregister N/A N/A N/A N/A atexit register _run_exitfuncs