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(), len(file), access=ACCESS_READ)
        try:
                data = mmap.read() 
                request = Request(url, data, headers)
                ...
        finally:
                map.close()


- Brian

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to