Concurrency and shelve

Michael Ströder michael at
Sun Mar 4 23:30:08 CET 2001

Erno Kuusela wrote:
> In article <3AA26D5E.2FD28B40 at>, Michael Ströder
> <michael at> writes:
> | Can anybody summarize issues with shelve (based on anydbm) and
> | concurrent access?
> afaik only gdbm does locking, the others break.

Hmm, it seems to me that gdbm does prevent other processes from
opening the database at all.

Python 2.0 (#1, Oct 18 2000, 18:49:22) 
[GCC 2.95.2 19991024 (release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import gdbm
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
gdbm.error: (11, 'Die Ressource ist zur Zeit nicht verf\374gbar')

BTW: I'm trying to use shelve to store web session data. How does
others solve this problem with the the standard lib without being to
DB-specific? Unpossible?

Ciao, Michael.

More information about the Python-list mailing list