def initialize(self): for i in range(10,0,-1): sleep(1) self.write(ac.clear + ac.move2(12, 40) + str(i)) self.write(ac.clear + ac.move2(12,40) + ac.blink + u'任意键继续') self.pause() data = tidy_anim(self.render_str('movie'), 21) self.anim = self.load(Animation, data, pause=self.pause, start_line=0, callback=self.play_done) self.anim.run(playone=True)
def goto_one(self): while True: try: data, time = self.gener.next() except StopIteration: data = None if data is None: self.callback() return self.write(data) if time is True: self.pause() elif time is False: self.callback() return else: sleep(time)
def refresh_auto(self): while True: sleep(self._delay) self.refresh()