Saving output to file using pycurl? Saving output to file using pycurl? curl curl

Saving output to file using pycurl?


You need to write the file yourself, here is an example:

import pycurlc = pycurl.Curl()c.setopt(c.URL, 'http://my.server/a.jpg')with open('o.jpg', 'w') as f:    c.setopt(c.WRITEFUNCTION, f.write)    c.perform()