diff options
author | Zachary Sloan | 2012-09-26 17:42:43 -0500 |
---|---|---|
committer | Zachary Sloan | 2012-09-26 17:42:43 -0500 |
commit | 720a13ae3ab8fda14f41a02374480574e27df890 (patch) | |
tree | 4ff5e468db18fbf6a3f5bf2168e83c74dc0df3cd /wqflask/utility | |
parent | 667c45ac54d4faab396723d1649dff1e27686b1f (diff) | |
download | genenetwork2-720a13ae3ab8fda14f41a02374480574e27df890.tar.gz |
Worked on implementing the extra attributes feature on the trait data page
Diffstat (limited to 'wqflask/utility')
-rwxr-xr-x | wqflask/utility/__init__.py | 12 |
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) + |