Is there a way to hook into module destruction?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun Jun 17 00:09:50 EDT 2007


En Sat, 16 Jun 2007 17:16:10 -0300, Neal Becker <ndbecker2 at gmail.com>  
escribió:

> Code at global scope in a module is run at module construction (init).   
> Is
> it possible to hook into module destruction (unloading)?

No exactly, but you could try the atexit module.

-- 
Gabriel Genellina




More information about the Python-list mailing list