I'm trying to create a 'Download Manager' for Linux that lets me download one single file using multiple threads. This is what I'm trying to do :
- Divide the file to be downloaded into different parts by specifying an offset
- Download the different parts into a temporary location
- Merge them into a single file.
Steps 2 and 3 are solvable, and it is at Step #1 that I'm stuck. How do I specify an offset while downloading a file?
Using something along the lines of open("/path/to/file", "wb").write(urllib2.urlopen(url).read())
does not let me specify a starting point to read from. Is there any alternative to this?