Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / lib / python2.4 / dbhash.py
CommitLineData
920dae64
AT
1"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""
2
3import sys
4try:
5 import bsddb
6except ImportError:
7 # prevent a second import of this module from spuriously succeeding
8 del sys.modules[__name__]
9 raise
10
11__all__ = ["error","open"]
12
13error = bsddb.error # Exported for anydbm
14
15def open(file, flag = 'r', mode=0666):
16 return bsddb.hashopen(file, flag, mode)