avoiding file corruption

Duncan Booth duncan.booth at invalid.invalid
Sun Aug 27 15:11:51 EDT 2006


Dennis Lee Bieber wrote:

> On Sun, 27 Aug 2006 14:41:05 -0000, Grant Edwards <grante at visi.com>
> declaimed the following in comp.lang.python:
> 
>> 
>> MS Windows seems to do something similar, and it pisses me off
>> no end.  Trying to open a file and read it while somebody else
>> has it open for writing causes an exception.  If I want to open
>> a file and read it while it's being writtent to, that's my
>> business. 
>>
>      Though strangely, Windows seems to permit one to make a COPY of that
> open file, and then open that with another application...

Yes, so long as the file hasn't been opened so as to deny reading you can 
open it for reading, but you do have to specify the sharing mode. Microsoft 
too follow the rule that "Explicit is better than implicit."



More information about the Python-list mailing list