curl-and-python

RE: Function to retrieve mulltiple URLs asyncrously

From: Kjetil Jacobsen <kjetilja_at_gmail.com>
Date: Fri, 11 Mar 2005 13:05:41 +0100

hi,

i'm not sure i understand. the code:

     while 1:
        ret, num_handles = m.perform()
        if ret != pycurl.E_CALL_MULTI_PERFORM:
            break

...is supposed to do the same as the corresponding c-code in the libcurl
examples which typically do:

  while(CURLM_CALL_MULTI_PERFORM ==
        curl_multi_perform(multi_handle, &still_running));

what am i missing here?

        - kjetil

-----Original Message-----
From: curl-and-python-bounces_at_cool.haxx.se
[mailto:curl-and-python-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: 11 March 2005 08:39
To: curl stuff in python
Cc: gf gf
Subject: Re: Function to retrieve mulltiple URLs asyncrously

On Thu, 10 Mar 2005, gf gf wrote:

> Also, I was having a bit of a problem with getting stuck at the
> select() - so I crudely modified it. I'm sure someone knows how to do
> it the right way.

I don't know much python, but...

             while 1:
                 ret, num_handles = m.perform()
                 if ret != pycurl.E_CALL_MULTI_PERFORM:
                     break

...this looks very wrong. m.perform() can also return OK without that
meaning that you should consider the transfers complete.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-and-python
_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-and-python
Received on 2005-03-11