

def get_uploader(self):
    'Initialze a Curl object for a single PUT request.\n\n        Returns a tuple of initialized Curl and HTTPResponse objects.\n        '
    c = pycurl.Curl()
    resp = HTTPResponse(self._encoding)
    c.setopt(pycurl.UPLOAD, 1)
    data = self._data.get('PUT', '')
    filesize = len(data)
    c.setopt(pycurl.READFUNCTION, DataWrapper(data).read)
    c.setopt(pycurl.INFILESIZE, filesize)
    c.setopt(c.WRITEFUNCTION, resp._body_callback)
    c.setopt(c.HEADERFUNCTION, resp._header_callback)
    c.setopt(c.URL, str(self._url))
    c.setopt(c.HTTPHEADER, map(str, self._headers))
    self._set_common(c)
    return (c, resp)

dataset/ETHPy150Open kdart/pycopia/WWW/pycopia/WWW/client.py HTTPRequest.get_uploader/original