+class Configuration(dict):
+
+ def __init__(self, *arg, **kw):
+ super(Configuration, self).__init__(*arg, **kw)
+
+ def _str2bool(x):
+ positives = ["yes", "true", "1", "y"]
+ negatives = ["no", "false", "0", "n"]
+ x = x.lower()
+ if x in positives:
+ return True
+ elif x in negatives:
+ return False
+ else:
+ raise ValueError("Unknown option %s" % x)
+
+defaults = Configuration({