]> git.lizzy.rs Git - plan9front.git/blob - sys/lib/python/dbhash.py
dist/mkfile: run binds in subshell
[plan9front.git] / sys / lib / python / dbhash.py
1 """Provide a (g)dbm-compatible interface to bsddb.hashopen."""
2
3 import sys
4 try:
5     import bsddb
6 except 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
13 error = bsddb.error                     # Exported for anydbm
14
15 def open(file, flag = 'r', mode=0666):
16     return bsddb.hashopen(file, flag, mode)