Staging
v0.5.1
Revision bb5cd08688a92bcb4cf255d9009dcbfaba0deb8b authored by Barry Warsaw on 02 April 2008, 23:33:27 UTC, committed by Barry Warsaw on 02 April 2008, 23:33:27 UTC
1 parent dd15bcd
Raw File
dbhash.py
"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""

import sys
try:
    import bsddb
except ImportError:
    # prevent a second import of this module from spuriously succeeding
    del sys.modules[__name__]
    raise

__all__ = ["error","open"]

error = bsddb.error                     # Exported for anydbm

def open(file, flag = 'r', mode=0o666):
    return bsddb.hashopen(file, flag, mode)
back to top