exclusive shelve open

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun Apr 29 19:15:12 EDT 2007


En Sun, 29 Apr 2007 17:13:42 -0300, <castironpi at gmail.com> escribió:

> On Apr 29, 2:12 pm, castiro... at gmail.com wrote:
>> I'm trying to be safe and make sure only one python instance opens the
>> shelf.  Any ideas?
> Using Windows.

Use the locking function in the msvcrt module to lock/unlock the file.  
Locking just the first byte is enough.

-- 
Gabriel Genellina



More information about the Python-list mailing list