Re: [Python-ideas] tarfile.extractall progress

2017-09-03 Thread francismb
Hi, >>> >>> 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

Re: [Python-ideas] tarfile.extractall progress

2017-09-01 Thread Serhiy Storchaka
01.09.17 14:50, Tarek Ziadé пише: For large archives, I want to display a progress bar while the archive is being extracted with: https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall I could write my own version of extractall() to do this, or maybe we could introduce a

Re: [Python-ideas] tarfile.extractall progress

2017-09-01 Thread Tarek Ziadé
On Fri, Sep 1, 2017, at 02:04 PM, Oleg Broytman wrote: > Hi! > > On Fri, Sep 01, 2017 at 01:50:13PM +0200, Tarek Ziad?? > wrote: > > Hey, > > > > For large archives, I want to display a progress bar while the archive > > is being extracted with: > > > >

Re: [Python-ideas] tarfile.extractall progress

2017-09-01 Thread Tarek Ziadé
On Fri, Sep 1, 2017, at 02:18 PM, Paul Moore wrote: [..] > > Sounds like a reasonable enhancement, but for your particular use > couldn't you just subclass TarFile and call your progress callback at > the end of the extract method after the base class extract? Yes that's what I ended up doing.

Re: [Python-ideas] tarfile.extractall progress

2017-09-01 Thread Paul Moore
On 1 September 2017 at 12:50, Tarek Ziadé wrote: > Hey, > > For large archives, I want to display a progress bar while the archive > is being extracted with: > > https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall > > I could write my own version of

Re: [Python-ideas] tarfile.extractall progress

2017-09-01 Thread Oleg Broytman
Hi! On Fri, Sep 01, 2017 at 01:50:13PM +0200, Tarek Ziad?? wrote: > Hey, > > For large archives, I want to display a progress bar while the archive > is being extracted with: > > https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall > > I could write my

[Python-ideas] tarfile.extractall progress

2017-09-01 Thread Tarek Ziadé
Hey, For large archives, I want to display a progress bar while the archive is being extracted with: https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.extractall I could write my own version of extractall() to do this, or maybe we could introduce a callback option that gets called