import sys, crumbs sys.exitfunc = my_func zY import sys, crumbs, atexit atexit.register(my_func) r=