diff options
| author | Pepper <pepper@scannerjammer.com> | 2015-03-07 18:38:28 -0500 |
|---|---|---|
| committer | Pepper <pepper@scannerjammer.com> | 2015-03-07 18:38:28 -0500 |
| commit | 21b2e256c344659e2294bee33a68b5cb040b9234 (patch) | |
| tree | 04d40d88ae9faab20ae671af6396eec0ee668981 /Pb_Api/Params.py | |
| parent | 107b40de0a2a7bcb6abcebb9aabd0f5bb7dabb4b (diff) | |
missing commit
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: |
