def send(): if self.progress[value] >= 100: t.stop() else: self.progress[value] += 1 livepage.IClientHandle(ctx).send(component[value].setPercent( str(self.progress[value])))
def render_table(self, ctx, suite): self.testId = 0 driver = Driver(suite) handle = livepage.IClientHandle(ctx) driver.notifyWhenTestsComplete().addCallback(self.testsComplete, handle) driver.setHandle(handle) driver.nextTest() return rend.sequence(ctx, suite)
def handle_changeNick(self, ctx, nick): changer = livepage.IClientHandle(ctx) rv = self.sendEvent( changer, set('user-list-%s' % (changer.userId, ), nick), eol, js.changeId('user-list-%s' % (changer.userId, ), 'user-list-%s' % (nick, )), eol, self.content(changer, 'changed nick to %r.' % (nick, ))) changer.userId = nick return rv
def handle_sendInput(self, ctx, inputLine): sender = livepage.IClientHandle(ctx) return self.sendEvent(sender, self.content(sender, inputLine)), eol, js.focusInput()