>       f = grabber.urlopen()

urlopen() looks like a win for small files, but the actual
implementation downloads to a tempfile and reopens it.
Avoid it if you can, and use urlgrab() instead.

> I dont know the total size. I can only estimate it after the first
> file has been downloaded as they are all the same.

You don't have to specify size in most cases, as urlgrabber
parses the Content-Length header, and passes that to the
TextMeter.start() method.  If it does not work, server probably
uses Transfer-encoding: chunked (usually because file is generated
dynamically, so even the server has no size hint).

> I was thinking of wrapping TextMeter and filter and change the values

If all files are the same, just stat the 1st file, and when
retrieving others, pass a "size" option to urlgrab/urlopen.

> there is a MultiFileMeter which I cant seem to able to use.

That's for parallel downloading, to be used as 'multi_progress_obj' option.
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to