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: > > > > https://docs.python.org/3/library/tarfi

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.

[Python-ideas] tarfile.extractall progress

2017-09-01 Thread Tarek Ziadé
Tarek -- Tarek Ziadé | coding: https://ziade.org | running: https://foule.es | twitter: @tarek_ziade ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.or

Re: [Python-ideas] Argparse argument deprecation

2017-08-09 Thread Tarek Ziadé
> Another note about the proposal: calling it "deprecated" seems odd, > since the proposal is really just a general-purpose callback. argparse > isn't generating the warning, your callback function would be doing it. > Why name it "deprecated"? How is this different than the "action" > keyword

[Python-ideas] Argparse argument deprecation

2017-08-09 Thread Tarek Ziadé
erride it etc. Another interesting approach suggest by Doug Hellman, which I like as much, is a set of higher level options that provide a deprecation workflow for arguments, see https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L441 What do you think? Cheers Tare

Re: [Python-ideas] Adding full() to collections.deque

2016-10-11 Thread Tarek Ziadé
Ah! I havn't thought about that because in my use case the deque is append-only so once it's full it discards older elements. I guess what I really need is a regular FIFO Queue Thanks for the feedback ! -- Tarek Ziadé | coding: https://ziade.org | running: https://foule.es

[Python-ideas] Adding full() to collections.deque

2016-10-11 Thread Tarek Ziadé
people think it's a good idea, I can add a ticket in the tracker and try to provide a patch for the collections module maintainer. If this was already talked about, or is a bad idea, sorry! :) Cheers Tarek -- Tarek Ziadé | coding: https://ziade.org | running: https://foule.es | twitter: @tarek_