Is there a way to use form_stream in pycurl?

From: Tonhão - Antonio Brasolin <>
Date: Fri, 5 Sep 2014 14:04:21 -0300


I've started using pycurl recently and am currently using the setop
pycurl.FORM_FILE. But the data that i want to send is in a string, so it is
weird to write a file just so the next method can read it.

So my doubt is: is there an alternative to pycurl.FORM_FILE that takes
either a string to be sent or a stream object (like a file object)?

readdata and readfunction won't work for post with multi-part form.

Thanks in advance,

El Psy Congroo,
Antonio Añon Brasolin,
Masters Degree Student in Universidade Federal de São Carlos

Received on 2014-09-05