[Tutor] gdbm and locking

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Thu, 9 Aug 2001 08:26:30 -0700 (PDT)

On Wed, 8 Aug 2001, Danie Roux wrote:

> Can I trust on Python/OS to ensure proper locking for gdbm databases? 

Yes, but you'll want to send the right sort of flags when you open the
gdbm file.  According to the documentation at:


you can open the database in locked mode automatically; I think you have
to feed in the parameter 'u' to actually get gdbm to ignore locking, so
you should be ok.  I have to admit, though, that I haven't used this
module yet.

You might want to ask your question on the main Python newsgroup as well
to see what they suggest.

Good luck!