source: python/trunk/Lib/dbhash.py@ 393

Last change on this file since 393 was 391, checked in by dmik, 11 years ago

python: Merge vendor 2.7.6 to trunk.

  • Property svn:eol-style set to native
File size: 498 bytes
Line 
1"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""
2
3import sys
4import warnings
5warnings.warnpy3k("in 3.x, the dbhash module has been removed", stacklevel=2)
6try:
7 import bsddb
8except 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
15error = bsddb.error # Exported for anydbm
16
17def open(file, flag = 'r', mode=0666):
18 return bsddb.hashopen(file, flag, mode)
Note: See TracBrowser for help on using the repository browser.