g2p / bedup

Btrfs deduplication
http://pypi.python.org/pypi/bedup
GNU General Public License v2.0
322 stars 50 forks source link

Display a progress bar, maybe: tqdm #72

Open jedie opened 8 years ago

jedie commented 8 years ago

https://github.com/tqdm/tqdm is a nice progress bar.

Is it possible to use it?

arpit1997 commented 8 years ago

I can suggest something to solve this issue we can use Progressbar library for this purpose. Here is a simple example for that

import time
import progressbar
bar = progressbar.ProgressBar(widgets=[
    ' [', progressbar.Timer(), '] ',
    progressbar.Bar(),
    ' (', progressbar.ETA(), ') ',
])
for i in bar(range(20)):
    time.sleep(0.1)

We can estimate how much objects are remaining and then show a progress bar like Git :smile_cat: :smile_cat: