Re: unloading extension library

2006-10-18 Thread Fredrik Lundh
Bill Pursell wrote: del sys.modules["spam"] del spam > > Should remove all the references, but I still don't want to wait for > garbage collection. I need to be sure that the dlclose() happens > and the destructors are called. Can I do that? (without relying > on ctypes, preferrably.)

Re: unloading extension library

2006-10-18 Thread Bill Pursell
Bill Pursell wrote: > I've got a simple extension module that contains two functions: > void hi(void) __attribute__((constructor)); > void hi(void) { printf("Hi!\n");} > void bye(void) __attribute__((destructor)); > void bye(void) { printf("Bye!\n");} > > > When I run in the interpreter: > > >>> i