title: How to copy a file in Python with a progress bar?
body: <p>When copying large files using <code>shutil.copy()</code>, you get no indication of how the operation is progressing..</p>
  
  <p>I have put together something that works - it uses a simple ProgressBar class (which simple returns a simple ASCII progress bar, as a string), and a loop of <code>open().read()</code> and <code>.write()</code> to do the actual copying. It displays the progress bar using <code>sys.stdout.write("\r%s\r" % (the_progress_bar))</code> which is a little hackish, but it works.</p>
  
  <p>You can see the code (in context) <a href="http://github.com/dbr/checktveps/tree/1be8f4445fbf766eba25f98f78ec52e955571608/autoPathTv.py#L64-153" rel="noreferrer">on github here</a></p>
  
  <p>Is there any built-in module that will do this better? Is there any improvements that can be made to this code?</p>