def do(self):
        'Do or redo the action'
        self._runner = self._generator(*self.args, **self.kwargs)
        rets = next(self._runner)
        if isinstance(rets, tuple):
            self._text = rets[0]
            return rets[1:]
        elif rets is None:
            self._text = ''
            return None
        else:
            self._text = rets
            return None
def do ( self ) : self . _runner = self . _generator ( * self . args , ** self . kwargs ) rets = next ( self . _runner ) if isinstance ( rets , tuple ) : self . _text = rets [ 0 ] return rets [ 1 : ] elif rets is None : self . _text = '' return None else : self . _text = rets return None
Do or redo the action