diff --git a/device.py b/device.py index 7827ec7..f930677 100644 --- a/device.py +++ b/device.py @@ -55,6 +55,9 @@ def go_red(self): self._write_pins(self.green_pins, 0) self._write_pins(self.red_pins, 1) + def run_method(self, method): + return locals()['%s' % method]() + def blink(self): for i in xrange(5): self.go_red()