How to delete a module file
Thomas Heller
theller at python.net
Thu Mar 3 12:28:56 EST 2005
Dennis Lee Bieber <wlfraed at ix.netcom.com> writes:
> On Thu, 03 Mar 2005 12:29:58 +0100, Olivier Ravard
> <olivier.ravard at novagrid.com> declaimed the following in
> comp.lang.python:
>
>>
>> So, what is the solution ?
>>
>>
> As the old joke concludes... "... stop doing that".
>
> I don't think Windows has any means to delete a file that it
> considers open. You might be able to /rename/ it to something else
> (since the OS knows where the "open" file is, it doesn't care about the
> name anymore), but the delete still has to be done after all users of
> the file have closed it.
Even if you are able to remove/rename the file, it won't help you
anyway, because there's no way to reload an extension module in a sane
way. AFAIK.
Thomas
More information about the Python-list
mailing list