pycurl: RETURNTRANSFER option doesn't exist
The manual shows the usage being something like this:
>>> import pycurl>>> import StringIO>>> b = StringIO.StringIO()>>> conn = pycurl.Curl()>>> conn.setopt(pycurl.URL, 'http://www.example.org')>>> conn.setopt(pycurl.WRITEFUNCTION, b.write)>>> conn.perform()>>> print b.getvalue()<HTML><HEAD> <TITLE>Example Web Page</TITLE></HEAD><body><p>You have reached this web page by typing "example.com","example.net", or "example.org" into your web browser.</p><p>These domain names are reserved for use in documentation and are not available for registration. See <a href="http://www.rfc-editor.org/rfc/rfc2606.txt">RFC 2606</a>, Section 3.</p></BODY></HTML>
Seems a little roundabout, but I'm not a big fan of PycURL...
CURLOPT_RETURNTRANSFER is not a libcurl option, it is but provided within the PHP/CURL binding
Have you tried executing print dir(pycurl)
and see if the option exists in the attribute list?