diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-09 09:54:51 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-09 09:54:51 -0400 |
commit | eb964fe9fcf13ad1a72e40451c5d85b6765d945f (patch) | |
tree | f175e535c24922aa7aa9c1ab9360ee71b72b1aad /tools.py | |
parent | 8f39536a7a5a15afeba52b1492f1d84fed95054f (diff) | |
parent | 3defeae5de899b315928f1b518fe2ff75662d430 (diff) | |
download | chroma-eb964fe9fcf13ad1a72e40451c5d85b6765d945f.tar.gz chroma-eb964fe9fcf13ad1a72e40451c5d85b6765d945f.tar.bz2 chroma-eb964fe9fcf13ad1a72e40451c5d85b6765d945f.zip |
merge
Diffstat (limited to 'tools.py')
-rw-r--r-- | tools.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -13,8 +13,9 @@ def progress(seq): n = len(seq) print '[' + ' '*21 + ']\r[', sys.stdout.flush() + update_interval = max(n // 10, 1) for i, item in enumerate(seq): - if i % (n//10) == 0: + if i % update_interval == 0: print '.', sys.stdout.flush() yield item |