3de6ba13bec6a9edb4462c6ac30a425fa8e7331a
[exim.git] / test / aux-fixed / 2800.lmdb-mkdb-dump.py
1 #!/usr/bin/env python
2 import os
3 import lmdb
4
5 if os.path.exists('2800.mdb'):
6     os.unlink('2800.mdb')
7
8 env = lmdb.open('2800.mdb', subdir=False);
9 with env.begin(write=True) as txn:
10    txn.put('first', 'data for first')
11    txn.put('second', 'A=1 B=2')
12    txn.put('third', 'A1:B2:C3')
13    cursor = txn.cursor()
14    for key, value in cursor:
15        print key, "=>", value