diff options
Diffstat (limited to 'lang/python/src/wiredtiger/util.py')
-rw-r--r-- | lang/python/src/wiredtiger/util.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lang/python/src/wiredtiger/util.py b/lang/python/src/wiredtiger/util.py new file mode 100644 index 00000000000..b8e8f1d65a4 --- /dev/null +++ b/lang/python/src/wiredtiger/util.py @@ -0,0 +1,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()) |