diff options
Diffstat (limited to 'Pb_Api/Params.py')
| -rw-r--r-- | Pb_Api/Params.py | 20 |
1 files changed, 13 insertions, 7 deletions
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: |
