Staging
v0.8.1
Revision e3357548cad69a9efa6a045356c8f93c270626d6 authored by Anthony Baxter on 29 March 2005, 12:35:54 UTC, committed by Anthony Baxter on 29 March 2005, 12:35:54 UTC
SF patch 1167316:  doctest.py fails self-test if run directly.
1 parent 92da66a
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=0666):
    return bsddb.hashopen(file, flag, mode)
back to top