From 720a13ae3ab8fda14f41a02374480574e27df890 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Wed, 26 Sep 2012 17:42:43 -0500 Subject: Worked on implementing the extra attributes feature on the trait data page --- wqflask/utility/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'wqflask/utility') diff --git a/wqflask/utility/__init__.py b/wqflask/utility/__init__.py index e69de29b..206d0d1c 100755 --- a/wqflask/utility/__init__.py +++ b/wqflask/utility/__init__.py @@ -0,0 +1,12 @@ +class Bunch(object): + """Make the configuration a little cleaner""" + def __init__(self, config_string = "", **kw): + if config_string: + td = yaml.load(config_string) + self.__dict__.update(td) + else: + self.__dict__ = kw + + def __repr__(self): + return yaml.dump(self.__dict__, default_flow_style=False) + -- cgit v1.2.3