Staging
v0.5.0
https://github.com/python/cpython
Raw File
Tip revision: 6c52d76db8b1cb836c136bd6a1044e85bfe8241e authored by Georg Brandl on 05 March 2011, 13:55:46 UTC
Close 2.3 branch.
Tip revision: 6c52d76
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