On Mar 25, 2012, at 9:27 PM, Paul Reznicek wrote: > I have similar needs and did not found usable answers, so I wrote some > q&d hacks for doctests and also for UI interactions, where the user should > be blocked until something in non-blocking deferred finish or "time-outed".
These hacks are all pretty awful, and you generally shouldn't use them. For doctests, I don't know that you can do much better (although doing what I said, and structuring your code so that the doctests can explicitly fire in-memory Deferreds or make callbacks directly instead of spinning the reactor, would be a better idea). (Bottom line: don't use doctests.) For user interactions, if you want to pause the ability of a user to perform certain interactions, explicitly pause or disable those interactions. Pretty much every GUI toolkit has a way to disable or grey out certain controls, and you should use those APIs rather than entering a broken re-entrant main loop with unsupported APIs. -glyph
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python