curl-and-python
Re: Pycurl equivalent to curl "-o" option.
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 19 Feb 2010 23:57:40 +0100 (CET)
Date: Fri, 19 Feb 2010 23:57:40 +0100 (CET)
On Fri, 19 Feb 2010, BZT wrote:
> The alias, by name, is "homeperm" (without quotes). It's a shortcut to "curl
> -o" and uses the same syntax, namely *curl -o [filename] [url]* I was
> wondering if an analogous command, or succession of commands, existed in
> pycurl.
curl.setopt(pycurl.WRITEDATA, fp)
possibly combined with:
curl.setopt(pycurl.WRITEFUNCITON, callback)
Examples:
http://pycurl.cvs.sourceforge.net/viewvc/pycurl/pycurl/examples/retriever.py?revision=1.19&view=markup
http://pycurl.cvs.sourceforge.net/viewvc/pycurl/pycurl/examples/basicfirst.py?revision=1.5&view=markup
-- / daniel.haxx.se _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-pythonReceived on 2010-02-19