How to check if a file is locked in Python
My colleague showed me a trick on how to do this earlier. What I was trying to do is poll a folder for a bunch of files and if they’re not there keep polling until they arrive, then process them. The problem is before they can be processed we need to be sure that the file transfer is complete.
The trick on how to do this is to try and open the file once it …