summaryrefslogtreecommitdiffstats
path: root/Lib/dbm/bsd.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-26 10:29:35 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-26 10:29:35 (GMT)
commit0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5 (patch)
treeec61fd6d53e6425b8639567860140c724ea7bc63 /Lib/dbm/bsd.py
parente6f00637be87c8f5f0e50bf317d684ea421a6d19 (diff)
downloadcpython-0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5.zip
cpython-0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5.tar.gz
cpython-0a7ac7d70d370544c6a9d118bbbd6886ad4f5ce5.tar.bz2
Create the dbm package from PEP 3108. #2881.
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)