On Dec 2, 2007 10:26 PM, Christopher Armstrong &lt;<a href="mailto:radix@twistedmatrix.com">radix@twistedmatrix.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all. I&#39;d like to make it possible to use the Python OpenID<br>asynchronously, specifically with the Twisted library.</blockquote><div><br>On Dec 3, 2007 2:27 AM, Kevin Turner &lt;<a href="mailto:kevin@janrain.com">
kevin@janrain.com</a>&gt; wrote:<br>&gt; Except, and this is a thing I only just realized, it would mess with our<br>&gt; ability to maintain line-by-line ports to PHP and Ruby.&nbsp;</div><div><br>Btw, (and I&#39;m not sure how well this fits with Twisted), I&#39;ve been looking into using co-routines [1] for asynchronous operations.
<br><br>What co-routines bring is the ability to keep existing linear code, and just by adding the yield for the blocking operations you gain the asynchronous nature of the call.<br><br>Co-routines do need a trampoline to &#39;run&#39; them and keep everything going.&nbsp; The one supplied in the PEP isn&#39;t great, and I had to tweak it a fair amount to get it do do what I wanted it to.&nbsp; I&#39;m happy to supply what code I have so far, just let me know.
<br><br>[1] <a href="http://www.python.org/dev/peps/pep-0342/">http://www.python.org/dev/peps/pep-0342/</a><br></div></div><br>-- <br>- Norman Rasmussen<br> - Email: <a href="mailto:norman@rasmussen.co.za">norman@rasmussen.co.za
</a><br> - Home page: <a href="http://norman.rasmussen.co.za/">http://norman.rasmussen.co.za/</a>