
July 29, 2016
7:59 p.m.
steven meier <commercials24@yahoo.de> writes:
if __name__ == '__main__': import qt5reactor qt5reactor.install() from twisted.internet import reactor reactor.callWhenRunning(print_it, reactor) reactor.run()
For "client-style" things (I guess I just mean "something that exits"), there's even a utility function that calls some method you provide with the reactor as the first argument, and arranges for reactor.stop() to get called exactly once (when the Deferred returned by your method fires). import qt5reactor qt5reactor.install() from twisted.internet.task import react if __name__ == '__main__': react(print_it) -- meejah