When pycurl executes its perform() method,
does the Python script wait until it gets executed (WRITEFUNCTION) or python
immediately proceeds to the next line even if WRITEFUNCTION hasn’t been entered or hasn’t returned a result?
E.g.
curl.setopt(pycurl.WRITEFUNCTION, receive)
curl.perform()
some_call() # is this line immeditely executed? can I expect receive() has already exited?
pycurl is a wrapper around the C implementation (libcurl), and the C implementation calls its WRITEFUNCTION callback during the execution of it’s
curl_easy_performorcurl_multi_performfunctions (the equivalent of the pycurlperform).So you can expect your callback to have finished executing before
performreturns. i.e. You can expectsome_call ()to be executed afterreceivefinishes.