Testing for complete uploaded file

Andrew Dalke adalke at mindspring.com
Wed May 28 14:27:05 EDT 2003


Carsten Gehling
> However since some of the files takes maybe a few minutes to upload, I
only
> want to process them AFTER the upload os complete.

  Under a unix system, there are commands like 'fstat' or 'fuser'
which give you information about which processes are using a file
(assuming it's not NFS mounted).  Give it a try.

  For example, in Python I opened the file "blah.tmp" and left
it open.  Then in another shell I said 'fstat blah.tmp' and it says

USER        CMD               PID    FD INUM      MODE           SZ|DV   R/W
MOUNT NAME
dalke          python2.3    12194      3    952021   -rw-r--r--
0    w        / blah.tmp

When I close the Python file handle, the above entry disappears.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list