Permalink
Browse files

Display progress when running 2to3

  • Loading branch information...
mdboom committed Nov 11, 2011
1 parent 11e5284 commit 07e9db8249b76c603872523dc8e8f132f7f74eca
Showing with 4 additions and 1 deletion.
  1. +4 −1 setup.py
View
@@ -276,7 +276,10 @@ def run_2to3(self, files):
[refactor(f) for f in filtered]
else:
p = multiprocessing.Pool()
- p.map(refactor, filtered)
+ for i, x in enumerate(p.imap_unordered(refactor, filtered)):
+ print("Running 2to3... %.02f%%" %
+ (float(i) / len(filtered) * 100.0), end='\r')
+ print()
print_raw("pymods %s" % py_modules)
print_raw("packages %s" % packages)

0 comments on commit 07e9db8

Please sign in to comment.