how to detect if a file is complete

Stefano Vedovelli spinwing at inwind.it
Fri Apr 5 01:38:07 EST 2002


Hello

in my opinion is more simple. Just try to obtain a lock to the file. Under Unix you can use the fcntl module, under Windows the win32file extension. If the file is in use by another process, the lock will just fail. You catch the exception, wait for a while, and give it another try, maybe with a thread.

Hope this helps
Stefano






More information about the Python-list mailing list