How to delete a module file

From: Olivier Ravard (olivier.ravard_at_novagrid.com)
Date: 02/28/05


Date: Mon, 28 Feb 2005 16:43:45 +0100

Hi everybody,

My application enables the developpment of new C++
modules that are dynamically loaded in this
application.

My problem is that (under Windows) I can't delete a
module that have been already imported. I must
exiting the application (which is not a good idea for
a developpment environnment).
i.e. I can't delete "module.pyd" if I made "import
module" in the python interpreter.

Is there some technics to "unload" modules under python ? or is there a
technic to force removing a file even it is used by another
application ?

Remark : This problem does not exist under Linux.

Thanks for your answers and ideas.

Olivier