[Twisted-Python] returning value after addCallback
p.mayers at imperial.ac.uk
Thu Aug 9 11:11:45 EDT 2007
> test = PingTracker()
> d = test.check(domain, test_opts)
> print d # this returns Deferred...
> test.SipCallback() # this returns None
Yes, because no Twisted code has run yet
...because you haven't started the reactor.
I don't think you properly understand how Twisted works. Your code is
executed in response to events (packets being received, timers expiring,
reactor startup/shutdown events). The reactor runs the event loop.
More information about the Twisted-Python