summaryrefslogtreecommitdiff
path: root/test/aux-fixed/2800.lmdb-mkdb-dump.py
diff options
context:
space:
mode:
authorAndrew Colin Kissa <andrew@topdog.za.net>2016-08-14 13:45:08 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-08-14 13:45:40 +0100
commit5bde3efabfec675b323501cae5e3a99784afcc31 (patch)
treebdb8686393521becc0c7552d066afa0646028eff /test/aux-fixed/2800.lmdb-mkdb-dump.py
parenteea0defeafb2d80a0ce656518523c0e928df4933 (diff)
LMDB: introduce as Experimental. Bug 1856
Diffstat (limited to 'test/aux-fixed/2800.lmdb-mkdb-dump.py')
-rw-r--r--test/aux-fixed/2800.lmdb-mkdb-dump.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/aux-fixed/2800.lmdb-mkdb-dump.py b/test/aux-fixed/2800.lmdb-mkdb-dump.py
new file mode 100644
index 000000000..3de6ba13b
--- /dev/null
+++ b/test/aux-fixed/2800.lmdb-mkdb-dump.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+import os
+import lmdb
+
+if os.path.exists('2800.mdb'):
+ os.unlink('2800.mdb')
+
+env = lmdb.open('2800.mdb', subdir=False);
+with env.begin(write=True) as txn:
+ txn.put('first', 'data for first')
+ txn.put('second', 'A=1 B=2')
+ txn.put('third', 'A1:B2:C3')
+ cursor = txn.cursor()
+ for key, value in cursor:
+ print key, "=>", value