> I doubt python calls __del__ when unloading module... and plus, I
> don't really think python does module unloading though. del module
Ah! Apologies... I mis-read the question.
Unloading or at least destroying the reference to a loaded module, you
could go for "del module_name"?
--
Gerald Kasz
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.
>
> S
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.
See http://docs.python.org/ref/customization.html for the docs.
--
Gerald Kas
En Sat, 16 Jun 2007 17:16:10 -0300, Neal Becker <[EMAIL PROTECTED]>
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
--
Code at global scope in a module is run at module construction (init). Is
it possible to hook into module destruction (unloading)?
--
http://mail.python.org/mailman/listinfo/python-list