skip to navigation
skip to content

Not Logged In

MultipartPostHandler2 0.1.3

A handler for urllib2 to enable multipart form uploading

Latest Version: 0.1.5

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.  
File Type Py Version Uploaded on Size
MultipartPostHandler2-0.1.3-py2.7.egg (md5) Python Egg 2.7 2014-05-10 5KB
MultipartPostHandler2-0.1.3.tar.gz (md5) Source 2014-05-10 3KB
  • Downloads (All Versions):
  • 25 downloads in the last day
  • 251 downloads in the last week
  • 962 downloads in the last month