Am 28.03.2013 17:42, schrieb Paul Moore:
On 28 March 2013 16:02, Vinay Sajip <[email protected]> wrote:
Return this directory. Note that the caller is responsible for
deleting this directory and its contents, which might not be
possible - e.g. in Windows, if a shared library has been
imported and is linked to the running Python process, there will be
an open handle to the shared library which will prevent its deletion.
"""
That's the big issue I have with *any* approach like this. It's
entirely possible that the directory cannot be deleted, and as a
result the user ends up with the problem of managing clutter caused by
this mechanism. Even if the directory is in %TEMP% the user still has
the issue of clearing up. Consider a buildslave that continually runs
tests - temp directory clutter is a definite issue in a situation like
that.
I made an experiment some time ago: It is possible to delete shared
libs containing extension modules imported by Python if the Python
process (after Py_Finalize()) calls FreeLibrary(hmod) in a loop for
every extension until FreeLibrary returns zero; then the shared lib file
can be deleted.
Thomas
_______________________________________________
Distutils-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig