Library function to encode data to multipart/form-data format?
Grant Edwards
invalid at invalid.invalid
Tue Dec 22 10:14:55 EST 2015
On 2015-12-21, Laura Creighton <lac at openend.se> wrote:
> In a message of Mon, 21 Dec 2015 17:51:00 +0000, Grant Edwards writes:
>>Is there a standard library function that can be used to encode data
>>into multipart/form-data format? IIRC, I looked for this once before
>>and didn't find anything in the library.
[...]
> Cannibalise this:
> http://code.activestate.com/recipes/146306/
> which just uses standard library things.
Yep, that's what I ended up doing. I noticed that the code referenced
above doesn't check to make sure the boundary string is not contained
in the data, so I fixed that.
--
Grant Edwards grant.b.edwards Yow! I'm gliding over a
at NUCLEAR WASTE DUMP near
gmail.com ATLANTA, Georgia!!
More information about the Python-list
mailing list