Staging
v0.5.0
https://github.com/python/cpython
Raw File
Tip revision: 189b6d85c9295e8224313c076fe5f298817cc76d authored by Barry Warsaw on 01 March 2008, 03:15:20 UTC
More copyright year and version number bumps
Tip revision: 189b6d8
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