<div class="gmail_quote">2010/3/7  <span dir="ltr"><<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 06:53 am, <a href="mailto:ping.nsr.yeh@gmail.com" target="_blank">ping.nsr.yeh@gmail.com</a> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I'm trying to find a way to create an asynchronous HTTP client so I<br>
can get responses from web servers in a way like<br>
<br>
 async_http_open('<a href="http://example.com/" target="_blank">http://example.com/</a>', callback_func)<br>
 # immediately continues, and callback_func is called with response<br>
as arg when it is ready<br>
<br>
It seems twisted can do it, but I hesitate to bring in such a big<br>
package as a dependency because my client should be light. Asyncore<br>
and asynchat are lighter but they don't speak HTTP. The asynchttp<br>
project on sourceforge is a fusion between asynchat and httplib, but<br>
it hasn't been updated since 2001 and is seriously out of sync with<br>
httplib.<br>
</blockquote>
<br></div>
Why should it be "light"?  In what way would using Twisted cause problems for you?<br>
<br>
Jean-Paul<br>
</blockquote></div><br><div>I'm writing an open source python client for a web service. The client may be used in all kinds of environments - Linux, Mac OS X, Windows, web hosting, etc by others. It is not impossible to have twisted as a dependency, but that makes deployment a larger job than simply uploading a Python file.</div>
<div><br></div><div>I'm willing to use twisted, but I'd like to explore lighter alternatives first.</div><div><br></div><div>Thanks,</div><div>Ping</div>