Skip to content

Instantly share code, notes, and snippets.

@hirokazumiyaji
Created May 8, 2015 02:35
Show Gist options
  • Save hirokazumiyaji/13199b8a44bb688ead50 to your computer and use it in GitHub Desktop.
Save hirokazumiyaji/13199b8a44bb688ead50 to your computer and use it in GitHub Desktop.
ProgressBar
# coding: utf-8
import time
from pip.utils.ui import DownloadProgressBar
LENGTH = 100
bar = DownloadProgressBar(max=LENGTH)
bar.suffix = ''
value = 0
for i in bar.iter(xrange(LENGTH)):
# some progress
value += i
time.sleep(.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment