@@ -0,0 +1,432 @@
+# -*- coding: utf-8 -*-%0A#%0A# Copyright (c) 2018~2999 - Cologler %3Cskyoflw@gmail.com%3E%0A# ----------%0A# exitable mean some class has %60__exit__(...)%60 attr.%0A# ----------%0A%0Aimport sys%0Aimport atexit%0A%0Adef dispose_at_exit(exitable):%0A    '''%0A    register %60exitable.__exit__()%60 into %60atexit%60 module.%0A%0A    return the %60exitable%60 itself.%0A    '''%0A    @atexit.register%0A    def callback():%0A        exitable.__exit__(*sys.exc_info())%0A    return exitable%0A

add dispose_at_exit()