MultipartPostHandler
index
/home/edwards/software/MultipartPostHandler/MultipartPostHandler.py

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.

 
Modules
       
mimetools
mimetypes
os
stat
urllib
urllib2

 
Classes
       
Callable
urllib2.BaseHandler
MultipartPostHandler

 
class Callable
     Methods defined here:
__init__(self, anycallable)

 
class MultipartPostHandler(urllib2.BaseHandler)
     Methods defined here:
http_request(self, request)
https_request = http_request(self, request)

Data and other attributes defined here:
handler_order = 490
multipart_encode = <MultipartPostHandler.Callable instance>

Methods inherited from urllib2.BaseHandler:
__lt__(self, other)
add_parent(self, parent)
close(self)

 
Functions
       
main()

 
Data
        doseq = 1