copytree with timeout in windows
mail at timgolden.me.uk
Tue Jul 7 06:11:30 CEST 2009
Astan Chee wrote:
> I'm trying to modify the copytree function in shutil so that any file
> being copied does not take more than 5 minutes (if it does, skip to the
> next one).
One suggestion is to use the CopyFileEx API
exposed in the win32file module from pywin32. That
allows for a callback function which can abort
the copy (or issue a progress meter, etc.).
Obviously, you'd have to roll your own copytree, but
that's not beyond the wit of man.
More information about the Python-list