Re: Is there a way to hook into module destruction?

2007-06-16 Thread Gerald Kaszuba
> 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

Re: Is there a way to hook into module destruction?

2007-06-16 Thread i3dmaster
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

Re: Is there a way to hook into module destruction?

2007-06-16 Thread Gerald Kaszuba
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

Re: Is there a way to hook into module destruction?

2007-06-16 Thread Gabriel Genellina
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 --

Is there a way to hook into module destruction?

2007-06-16 Thread Neal Becker
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