From 45fb8b4961e1dc8251502f04cb94a4fcf1848f83 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Thu, 27 Sep 2012 17:40:16 -0500 Subject: Worked on getting attributes in the SampleList object to display data properly, changed SampleList from an object list to object --- wqflask/utility/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'wqflask/utility') diff --git a/wqflask/utility/__init__.py b/wqflask/utility/__init__.py index 206d0d1c..d0e4a3fa 100755 --- a/wqflask/utility/__init__.py +++ b/wqflask/utility/__init__.py @@ -1,12 +1,12 @@ +from pprint import pformat as pf + + 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: + """Like a dictionary but using object notation""" + def __init__(self, **kw): self.__dict__ = kw def __repr__(self): - return yaml.dump(self.__dict__, default_flow_style=False) + return pf(self.__dict__) + -- cgit v1.2.3