Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: e7abfd7cefc4e737eef3a4b8c2b26fec3c97fac0 authored by Martin v. Löwis on 24 January 2010, 14:24:46 UTC
Prepare for 2.5.5c2.
Tip revision: e7abfd7
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