making a python program wait until twisted deferred returns a value,reactor.run()