Files question

Dinu C. Gherman gherman at darwin.in-berlin.de
Thu Jul 13 10:46:41 EDT 2000


sergio wrote:
> 
>     I'm working in winNT Server 4.0.
>     How can i know if a file is open by other apllication, in order to
> wait till the file is free

Have you tried just reading a few bytes and catch the
IOError if there is any (supposed you know the file 
does exist)? Just an (untested) idea...

Dinu

-- 
Dinu C. Gherman
................................................................
"The only possible values [for quality] are 'excellent' and 'in-
sanely excellent', depending on whether lives are at stake or 
not. Otherwise you don't enjoy your work, you don't work well, 
and the project goes down the drain." 
                    (Kent Beck, "Extreme Programming Explained")



More information about the Python-list mailing list