MultipartPostHandler 0.1.0
A handler for urllib2 to enable multipart form uploading
Usage:
Enables the use of multipart/form-data for posting forms
Inspirations:
Upload files in python:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146306
urllib2_file:
Fabien Seisen: <fabien@seisen.org>
Example:
import MultipartPostHandler, urllib2, cookielib
cookies = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookies),
MultipartPostHandler.MultipartPostHandler)
params = { "username" : "bob", "password" : "riviera",
"file" : open("filename", "rb") }
opener.open("http://wwww.bobsite.com/upload/", params)
Further Example:
The main function of this file is a sample which downloads a page and
then uploads it to the W3C validator.
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| MultipartPostHandler-0.1.0-py2.6.egg (md5) | Python Egg | 2.6 | 2010-06-05 | 7KB | 2718 |
| MultipartPostHandler-0.1.0.tar.gz (md5) | Source | 2010-06-05 | 3KB | 6710 | |
- Author: Will Holcomb
- Home Page: http://pipe.scs.fsu.edu/PostHandler/MultipartPostHandler.py
- Keywords: http,multipart,post,urllib2
-
Categories
- Development Status :: 4 - Beta
- Environment :: Other Environment
- Intended Audience :: Developers
- License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
- Operating System :: OS Independent
- Programming Language :: Python
- Programming Language :: Python :: 2
- Topic :: Software Development :: Libraries :: Python Modules
- Package Index Owner: mikejedw
- DOAP record: MultipartPostHandler-0.1.0.xml
