Size of a remote URL

Dave Brueck dave at pythonapocrypha.com
Mon Aug 30 13:26:19 EDT 2004


Justin wrote:

> I want to track the download of files in a progress bar.  I asume I
> need the final size to do that so I can compare it to the current size
> on disk.  Le tme know if you know anything

Yep, you're basically out of luck. You'll notice that the download 
dialog boxes on most web browsers have two "modes" - one in which they 
show a progress bar, time remaining, etc. because the file size is 
known, and another mode in which they show megabytes downloaded so far 
(plus  perhaps time elapsed or something) because the size is not known 
- the progress bar doesn't show any progress.

You'll probably have to do something similar. Too bad, huh?

-Dave




More information about the Python-list mailing list