copytree with timeout in windows
mail at timgolden.me.uk
Tue Jul 7 09:42:55 CEST 2009
Astan Chee wrote:
> Tim Golden wrote:
>> 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.).
> Thanks, but looking in the documentation there is no callback function.
> Did you mean */the Progress Routine?
Well, depending on which hairs you're splitting, I would
argue that the Progress Routine *is* a callback function:
it is a function which is called back. But, yes, I
did mean that. :)
More information about the Python-list