locking files

Christopher Lee clee at gnwy100.wuh.wustl.edu
Wed Feb 21 16:34:34 EST 2001

chris> fp = open("tmp", "rw")

oops, indicision on my part.  see below

> fd = open("ftbl", "wr")

The "w" truncates the file.  You probably want either "r" or "r+" or "a+"
see the python library reference on open or the C fopen call.


fd = open("ftbl", "r+")


More information about the Python-list mailing list