Debian Codegraph @

cpython27/Lib/dbhash.py

raw symbols SCIP
1 """Provide a (g)dbm-compatible interface to bsddb.hashopen."""
2
3 import sys
4 import warnings
5 warnings.warnpy3k("in 3.x, the dbhash module has been removed", stacklevel=2)
6 try:
7 import bsddb
8 except ImportError:
9 # prevent a second import of this module from spuriously succeeding
10 del sys.modules[__name__]
11 raise
12
13 __all__ = ["error","open"]
14
15 error = bsddb.error # Exported for anydbm
16
17 def open(file, flag = 'r', mode=0666):
18 return bsddb.hashopen(file, flag, mode)