1
from shelve import Shelf
3
class DbfilenameShelf(Shelf):
4
"""Shelf implementation using the "anydbm" generic dbm interface.
6
This is initialized with the filename for the dbm database.
7
See the module's __doc__ string for an overview of the interface.
10
def __init__(self, filename, flag='c'):
11
import dumbdbm_patched
12
Shelf.__init__(self, dumbdbm_patched.open(filename, flag))
15
def open(filename, flag='c'):
16
"""Open a persistent dictionary for reading and writing.
18
Argument is the filename for the dbm database.
19
See the module's __doc__ string for an overview of the interface.
22
return DbfilenameShelf(filename, flag)