reading files

Fuzzyman fuzzyman at gmail.com
Mon Dec 19 09:33:09 EST 2005


Steven D'Aprano wrote:
[snip..]
> (It is good practice to close the file as soon as you can, especially on
> platforms like Windows where open files can't be read by any other process.)
>

Unfortuantely not the case - on windoze (XP SP2 at least) you can open
a file in one process (for reading or writing) and still read (or write
to) it from another process.

FIle locking nightmare ahoy... You can obtain locks from the operating
system though.

All the best,

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml




More information about the Python-list mailing list