curlpython without a file?

From: Brian Wawok <>
Date: Mon, 5 Apr 2010 18:30:53 -0500

I am trying to http post a file with cuyrlpython. I can get it to work
like this:

                    output = open("c:\\test.text", 'w')
                    c = pycurl.Curl()
                    c.setopt(c.POST, 1)
                    c.setopt(c.URL, completeUrl)
                    c.setopt(c.HTTPPOST, [("sc", (c.FORM_FILE,
'c:\\test.text') )])

But that is pretty silly. I have tried various variations of
StringIO.StringIO with no luck. How do I take my string and send it
along as my http file? Thanks a bunch!
Received on 2010-04-06