summaryrefslogtreecommitdiffstats
path: root/Lib/dbm/bsd.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/dbm/bsd.py')
-rw-r--r--Lib/dbm/bsd.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/dbm/bsd.py b/Lib/dbm/bsd.py
new file mode 100644
index 0000000..8353f50
--- /dev/null
+++ b/Lib/dbm/bsd.py
@@ -0,0 +1,10 @@
+"""Provide a (g)dbm-compatible interface to bsddb.hashopen."""
+
+import bsddb
+
+__all__ = ["error", "open"]
+
+error = bsddb.error
+
+def open(file, flag = 'r', mode=0o666):
+ return bsddb.hashopen(file, flag, mode)