Automatically resume a download w/ urllib?

Oleg Broytmann phd at phd.pp.ru
Sun Oct 21 08:58:22 EDT 2001


On Sun, Oct 21, 2001 at 02:02:52AM +0000, Chris Moffitt wrote:
> I'm trying to develop a small application (mostly for Windows if that 
> matters), than can download and install binary files stored on a web server.
> 
> I've been able to get urllib to download the file just fine, but what I 
> would like to do is be able to resume a download if it is cancelled for 
> some reason.  In other words, if I've downloaded 50k of a 200k file, I'd 
> like to just download the remaining 150k.

   I think it is impossible with urllib.

> Is this possible using HTTP and Apache?  If not, what about FTP?  If 

   It is possible with Apache (apache supports HTTP Ranges) and httplib,
but you'll need some coding. Learn about HTTP headers, especially Ranges.
   It is also possible with FTP and ftplib, but again, you'll need some
coding, and not all FTP servers support download resuming. Learn about ftp
commands.
   We'll very much appreciate if you post your working code here. Good luck.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list