multipart/form-data in an HTTP client

John J. Lee jjl at
Wed Sep 1 23:43:08 CEST 2004

Jeff Shannon <jeff at> writes:
> I've been using something closely modelled on that Cookbook recipe,
> without any real problems.  (I've updated it to use
> HTTP[S]Connection() and return the response object, and in my case I'm
> connecting to an HTTPS server, but these are trivial modifications.)
> I, too, was surprised that the existing Python libraries don't
> directly support multipart/form-data already, and I hope that this
> gets added in soon.

Have you published your function?  If not, please do.

Several people would like to see such a function in 2.5 (including
me), and your function sounds a good candidate.  Maybe a little
polishing is required, but don't let that stop you: if you don't get
time to do that polishing, this is a rare occasion when somebody else
is likely to push it the small additional distance it would need to go
in order to get into the Python stdlib!


More information about the Python-list mailing list