Open file handles?

danielx danielwong at berkeley.edu
Wed Aug 9 22:22:10 EDT 2006


Is there an equivalent in windows?

Jon wrote:
> 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




More information about the Python-list mailing list