]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/dbhash.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / dbhash.py
CommitLineData
4710c53d 1"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""\r
2\r
3import sys\r
4import warnings\r
5warnings.warnpy3k("in 3.x, the dbhash module has been removed", stacklevel=2)\r
6try:\r
7 import bsddb\r
8except ImportError:\r
9 # prevent a second import of this module from spuriously succeeding\r
10 del sys.modules[__name__]\r
11 raise\r
12\r
13__all__ = ["error","open"]\r
14\r
15error = bsddb.error # Exported for anydbm\r
16\r
17def open(file, flag = 'r', mode=0666):\r
18 return bsddb.hashopen(file, flag, mode)\r