Reputation: 21
I am using http://pypi.python.org/pypi/mechanize/0.1.11 for programmatic web browsing, I want to be able to upload files to servers the same way the browser does (by sending the content as multipart/form-data, defined in RFC2388)
Is this possible with mechanize, can you show me an example?
Thanks!
Upvotes: 2
Views: 1836
Reputation: 882791
There's a couple of good answer on this SO question, one with bare mechanize and one with twill on top of it, and I believe they both end up sending multipart/form-data as you want.
Upvotes: 2