Defend against symlink attack by another process running as exim
[exim.git] / test / aux-fixed / 2800.lmdb-mkdb-dump.py
CommitLineData
5bde3efa
ACK
1#!/usr/bin/env python
2import os
3import lmdb
4
5if os.path.exists('2800.mdb'):
6 os.unlink('2800.mdb')
7
8env = lmdb.open('2800.mdb', subdir=False);
9with 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