module finalizer - is there such a beast?

Thomas Troeger thomas.troeger.ext at siemens.com
Fri Jan 11 06:47:56 EST 2008


You can execute cleanup code if the interpreter exits:

http://docs.python.org/lib/module-atexit.html

This will only cover the `Python's exit' part of your question, not the 
module reloading stuff. On the other hand, if you load a module you 
could set a global variable and check for it on reload...



More information about the Python-list mailing list