
Nov. 17, 2008
7:14 p.m.
Hi. Maybe I'm just blind and can't find it, but it seems that python has no file based lock. I wrote one using fcntl (mscvrt on windows): http://twoday.tuwien.ac.at/pub/stories/319462/ I think this would be a nice addition to pythons standard library. I called the lock/unlock methods, well, lock and unlock (and there is a trylock method, too). I just now saw the methods of threading.Lock are called acquire and release. Shall I change the method names? (a matter of s/\<lock\>/acquire/g s/\<unlock\>/release/g s/\<trylock\>/tryacquire/g) I will change it if it gets included to python that way. I like lock/unlock more, though. -panzi