diff options
Diffstat (limited to 'test/aux-fixed/2800.lmdb-mkdb-dump.py')
-rw-r--r-- | test/aux-fixed/2800.lmdb-mkdb-dump.py | 15 |
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 |