def test_a(N=1000*1000): print "Have patience ..." root = Tk() mi = multi_iter([print_a(i) for i in xrange(1, N+1)], terminate=False) lc = TkinterLoopingCall(mi.next) lc.start() root.after(10*60*1000, root.quit) # 10 minutes root.mainloop()
def connectionMade(self): self.stdout = self.transport self.preloop() intro = getattr(self, "intro", None) if intro: self.stdout.write(intro.replace("\n", "\r\n") + "\r\n") self.stdout.write(self.prompt) self.downloads = [] mi = multi_iter(self.downloads, terminate=False) self.iterloop = task.LoopingCall(mi.next) self.iterloop.start(0)
def preloop(self): self.downloads = [] mi = multi_iter(self.downloads, terminate=False) self.lc = ThreadedLoopingCall(mi.next) self.lc.start()
def preloop(self): self.downloads = [] self.mi = multi_iter(self.downloads, terminate=False)