curl-and-python
Re: Get propfind XML in memory
Date: Wed, 12 Nov 2008 22:59:18 -0500
try using setopt(WRITEFUNCTION) and an accumulator? (I use a simple
class for the accumulator)
On Wed, Nov 12, 2008 at 4:26 AM, Deon Bredenhann <deon_at_outprosys.com> wrote:
> Hi all
>
> I just started out playing a bit with pycurl and webdav, now I seem to
> be stuck on a small little issue.
>
> f = StringIO.StringIO()
> curl.setopt(curl.WRITEDATA, f)
> (pycurl.CUSTOMREQUEST, "PROPFIND")
>
> The setopt returns an error:
> TypeError: invalid arguments to setopt
>
> So it looks like a file on disk and the file handle provided by StringIO
> is not the same.
>
> Is there any way I can get the XML without writing it to disk first and
> the loading it again.
>
> Thanx a mil
> Deon
>
>
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
>
-- _Mark_ <eichin_at_thok.org> <eichin_at_gmail.com> _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-pythonReceived on 2008-11-13