Re: HTTP POST uploading large files

2008-01-20 Thread Wolfgang Draxinger
Paul Rubin wrote: > Wolfgang Draxinger <[EMAIL PROTECTED]> writes: >> 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...). > > I did something like that by just opening a socket and writing > the >

Re: HTTP POST uploading large files

2008-01-20 Thread Paul Rubin
Wolfgang Draxinger <[EMAIL PROTECTED]> writes: > 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...). I did something like that by just opening a socket and writing the stuff with socket.sendall. It'

RE: HTTP POST uploading large files

2008-01-20 Thread Brian Smith
Wolfgang Draxinger wrote: > 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. Try using mmap. Here is some untested code: map = mmap(file.fileno(

Re: HTTP POST uploading large files

2008-01-19 Thread Gabriel Genellina
En Sat, 19 Jan 2008 21:19:24 -0200, Wolfgang Draxinger <[EMAIL PROTECTED]> escribi�: > 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

HTTP POST uploading large files

2008-01-19 Thread Wolfgang Draxinger
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 wh