Georg Brandl | 0a7ac7d | 2008-05-26 10:29:35 +0000 | [diff] [blame] | 1 | """Provide a (g)dbm-compatible interface to bsddb.hashopen.""" |
2 | |||||
3 | import bsddb | ||||
4 | |||||
5 | __all__ = ["error", "open"] | ||||
6 | |||||
Georg Brandl | b17acad | 2008-05-28 08:43:17 +0000 | [diff] [blame^] | 7 | class error(bsddb.error, IOError): |
8 | pass | ||||
Georg Brandl | 0a7ac7d | 2008-05-26 10:29:35 +0000 | [diff] [blame] | 9 | |
10 | def open(file, flag = 'r', mode=0o666): | ||||
11 | return bsddb.hashopen(file, flag, mode) |