On Jun 16, 11:03 pm, Gerald Kaszuba <[EMAIL PROTECTED]> wrote: > On Jun 17, 6:16 am, Neal Becker <[EMAIL PROTECTED]> wrote: > > > Code at global scope in a module is run at module construction (init). Is > > it possible to hook into module destruction (unloading)? > > Try the __del__ method. > > Seehttp://docs.python.org/ref/customization.htmlfor the docs. > > -- > Gerald Kaszubahttp://geraldkaszuba.com
I doubt python calls __del__ when unloading module... and plus, I don't really think python does module unloading though. del module after import it got it removed from the global namespace but it does not clean reference I bet, so completely unloading a module should take more energy of that... Jim -- http://mail.python.org/mailman/listinfo/python-list