[Python-ideas] tarfile.extractall progress

francismb francismb at email.de
Sun Sep 3 15:36:15 EDT 2017


>>> For large archives, I want to display a progress bar while the archive
>>> is being extracted with:

>>> The callback can receive the tarinfo object and where it's being
>>> extracted. This is enough to plug a progress bar
>>> and avoid reinventing .extractall()
>>    What is "where" here? I think it should be 2 parameters -- position
>> in the file (in bytes) and total file size; the total could be None if
>> the size is unknown (the tar is piped from network or a (g/bz)zip
>> subprocess).
> Interesting. In my mind, I was thinking about a high level callable that
> would just let me count the files and directory that are being
> extracted,
Should it, in the case of just on big file, be the progress 0% (start)
or 100% (done) ? or there's a way to see some progress in that case ?
or is irrelevant for that case ?

Thanks in advance!

More information about the Python-ideas mailing list