Staging
v0.5.1
https://github.com/python/cpython
Revision f2bfd54d6f2acde253ae24805edf116c372bd81e authored by Georg Brandl on 29 March 2008, 13:24:23 UTC, committed by Georg Brandl on 29 March 2008, 13:24:23 UTC
1 parent ea13dc6
Raw File
Tip revision: f2bfd54d6f2acde253ae24805edf116c372bd81e authored by Georg Brandl on 29 March 2008, 13:24:23 UTC
Properly check for consistency with the third argument of
Tip revision: f2bfd54
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=0666):
    return bsddb.hashopen(file, flag, mode)
back to top