shelve databases

Skip Montanaro skip at pobox.com
Fri May 23 23:30:01 EDT 2003


    >> ... dont know how to implement a multiuser database with shelve, how
    >> to lock and unlock for example.

    Raymond> import threading, shelve

    Raymond> class MultiUserDict(shelve.shelve):
    Raymond>     dblock = threading.Lock()
    ...

That's fine for a single process with multiple threads of execution, but
unfortunately it won't help mediate access between multiple processes, which
is how I interpreted the OP's question.

Skip






More information about the Python-list mailing list