From 21b2e256c344659e2294bee33a68b5cb040b9234 Mon Sep 17 00:00:00 2001 From: Pepper Date: Sat, 7 Mar 2015 18:38:28 -0500 Subject: missing commit --- Pb_Api/Params.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'Pb_Api/Params.py') diff --git a/Pb_Api/Params.py b/Pb_Api/Params.py index 9ab90a9..29bb423 100644 --- a/Pb_Api/Params.py +++ b/Pb_Api/Params.py @@ -1,26 +1,32 @@ import pprint class Pb_Api_Params(object): + def __init__(self): + self._api = None def param(self, name): for p in self.params: if p.name == name: return p return None -# def __iter__(self): -# return iter(self.params) - def __str__(self): return pprint.pformat({ "params": map(lambda x: vars(x), self.params) }) + def randomize(self): for el in self.params: if el.set_by_user: continue el.randomize() - - def __dict__(self): - return dict(self) - + @property + def api(self): + return self._api + @api.setter + def api(self, cls): + self._api = cls + + #does this really have to be here in Pb_Api_Params? seems confusing though yeah it has to be here because ImPattern inherits from it? impatter params + def execute(self): + return self.api.call(self) def is_ready(self): for p in self.params: -- cgit v1.2.3-70-g09d2