[Twisted-Python] Blocking

Jonathan Lange jml at ids.org.au
Thu May 8 03:47:10 EDT 2003

On 2003.05.06 20:10, Moshe Zadka wrote:
> In short command-line scripts, it's often much easier to block,
> especially
> if the script doesn't need to do any serving. However, Twisted's API
> is
> always non-blocking, returning deferreds. Here's a short function that
> allowes more natural usage from scripts:

This is also useful in unit testing. To that end, the functions 
deferredResult and deferredFailure have been available in trial for 
some time. They currently live in twisted.trial.util.

Further reading of the mailing list indicates that something should 
probably be done about this.


More information about the Twisted-Python mailing list