Perhaps using os you could work with lsof [http://www.linuxcommand.org/man_pages/lsof8.html]
Jon Thomas Bartkus wrote: > This may be more of a Linux question, but I'm doing this from Python. ..... > > How can I know if anything (I don't care who or what!) is in the middle of > using a particular file? > > This comes in context of needing to copy a file BUT only if I can verify > that something else doesn't have an open write handle to that file. IOW - I > need to decline the operation if something else hasn't finished writing to > the file. > > How can I know? > Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list