HTTP POST uploading large files

Wolfgang Draxinger wdraxinger at darkstargames.de
Sat Jan 19 18:19:24 EST 2008


I'm thinking about writing a script to upload videos to sites
like YouTube or Google Video, which is usually done by a HTTP
POST.

The problem is, that videos, by nature are rather big files,
however urllib2 wants it's Request objects being prepared
beforehand, which would mean to first load the whole file to
memory.

I looked into pycURL, knowing that cURL can POST send files
directily from the file system, however pycURL doesn't expose
the neccesary functions yet.

Am I just blind for some urllib2/httplib feature, or some other
library? Or do I really have to fiddle around with sockets
myself (I hope not...).

Thanks in advance

Wolfgang Draxinger
-- 
E-Mail address works, Jabber: hexarith at jabber.org, ICQ: 134682867




More information about the Python-list mailing list