Skip to main content

A handler for urllib2 to enable multipart form uploading

Project description

Usage:
Enables the use of multipart/form-data for posting forms
add a fix for utf-8 systems.

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

opener = urllib2.build_opener(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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MultipartPostHandler2-0.1.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

MultipartPostHandler2-0.1.3-py2.7.egg (5.6 kB view details)

Uploaded Source

File details

Details for the file MultipartPostHandler2-0.1.3.tar.gz.

File metadata

File hashes

Hashes for MultipartPostHandler2-0.1.3.tar.gz
Algorithm Hash digest
SHA256 57d5e7da1884c3fa00e811ac2a8f2e5cf186434948adc9df49cf5c4479b2ef27
MD5 e8103c32edad3384fd18c28e12ff42a5
BLAKE2b-256 6412ab9a9027680d197ec240ac222140c4f8318779773c871cd8f99bfe43fd1b

See more details on using hashes here.

File details

Details for the file MultipartPostHandler2-0.1.3-py2.7.egg.

File metadata

File hashes

Hashes for MultipartPostHandler2-0.1.3-py2.7.egg
Algorithm Hash digest
SHA256 7d14bbae43491fb202715412d802b2b44b484ed7b0799a8acc9df6a9fcbf7983
MD5 ba3250df3649c9c1a09771e998e9b7f0
BLAKE2b-256 e03f0c32e76b84bb20b2c53ec3f7c7f7a619b28fb6b1f3ffb272ecf92903bb1f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page