[Twisted-Python] waitForDeferred Question

Phil Mayers p.mayers at imperial.ac.uk
Sat Mar 11 08:31:58 EST 2006

Brian Granger wrote:
> I probably should have given more details about what I am trying to
> do.  Before I get going, I should mention that I have been using
> Twisted heavily for 1.5 years and I have, for the most part, learned
> to play the "Twisted Game."

If that is the case, you really ought to have known the answer was "you 
don't" ;o)

> So here is what I am working on:
> I am developing objects (for scientific computing) that 1) use Twisted
> to talk over the network and 2) need to be used interactively from a
> python prompt.  This second point is really where the difficult and
> interesting things are.

That is not an unreasonable use-case in fact (IMHO of course).

The sad thing is that PyCrust is wxPython so by definition AWFUL. The 
many suggestions already are correct - stop the interpreter GUI for a 
certain time (say 10ms) then if the deferred calls back, restart with 
the result else return a "backgrounded" job

That said, possible someone can comment if this code is current:


The Manager class getDeferred method might be a start, if you can 
integrate it with the wx-style tsr.

More information about the Twisted-Python mailing list