reactor.callLater() is the best way to delay a certain function call.  sleep() will block the entire program from running, which you probably don&#39;t want to do.<br><br><br><div class="gmail_quote">On Wed, Oct 7, 2009 at 3:35 PM, Paul Thomas <span dir="ltr">&lt;<a href="mailto:spongelavapaul@googlemail.com">spongelavapaul@googlemail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
On 7 Oct 2009, at 20:30, Paul Thomas wrote:<br>
<br>
&gt; Is there any way to do something like &quot;yield sleep(10)&quot; inside an<br>
&gt; @inlineCallbacks method?<br>
<br>
</div>I realise I can do this:<br>
<br>
def sleep(seconds):<br>
     d = defer.Deferred()<br>
     reactor.callLater(seconds, d.callback, seconds)<br>
     return d<br>
<br>
but I wondered if something like that is already in the libraries?<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br>