summaryrefslogtreecommitdiff
path: root/lang/python/src/wiredtiger/util.py
blob: b8e8f1d65a451cc8e3ce535c600266cad826be4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#
#
# Copyright (c) 2008-2012 WiredTiger, Inc.
#	All rights reserved.
#
# See the file LICENSE for redistribution information.

import re

def parse_config(config):
    for l in re.findall(r'(?:\(.*?\)|[^,])+', config):
        for k, v in (l+"=yes").split('=')[0:2]:
            yield (k.strip(), v.strip())