aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/__init__.py
diff options
context:
space:
mode:
authorZachary Sloan2012-09-26 17:42:43 -0500
committerZachary Sloan2012-09-26 17:42:43 -0500
commit720a13ae3ab8fda14f41a02374480574e27df890 (patch)
tree4ff5e468db18fbf6a3f5bf2168e83c74dc0df3cd /wqflask/utility/__init__.py
parent667c45ac54d4faab396723d1649dff1e27686b1f (diff)
downloadgenenetwork2-720a13ae3ab8fda14f41a02374480574e27df890.tar.gz
Worked on implementing the extra attributes feature on the trait data page
Diffstat (limited to 'wqflask/utility/__init__.py')
-rwxr-xr-xwqflask/utility/__init__.py12
1 files changed, 12 insertions, 0 deletions
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)
+