title: Python Threading: Multiline Progress Report
body: <p>I'm writing this program that downloads multiple files simultaneously using threads and reports the progress for each file on the screen. 
  I'm using one different thread to download each file. That is no problem:</p>
  
  <pre><code>for file_url, filename in zip(file_urls, filenames):
      th = Thread(target=download_file, args=(file_url, filename))
      threads.append(th)
      th.start()
  
  for thread in threads:
      thread.join()
  </code></pre>
  
  <p>The problem is I don't know anyways that I can print each file progress report on the screen that will look like this:</p>
  
  <pre><code>    "Downloading 'example1.zip':  54366 bytes of 2240799  70.7%" 
      "Downloading 'example2.zip':  31712 bytes of 1924639  64.7%" 
      "Downloading 'example3.zip':  21712 bytes of 3224979  34.7%" 
  </code></pre>
  
  <p>The following snippet is for a single line progress report:</p>
  
  <pre><code>def chunk_report(bytes_so_far, total_size, filename):
  
      percent = float(bytes_so_far) / total_size
      percent = round(percent * 100, 2)
      print "Downloading '{0}':  {1} of {2}  {3:3.2g}% \r".format(filename,
                                          bytes_so_far, total_size, percent),
  </code></pre>
  
  <p>and the output would look like this:</p>
  
  <pre><code>    "Downloading 'example2.zip':  31712 bytes of 1924639  64.7%" 
  </code></pre>
  
  <p>each time a thread call this function it updates the screen for the file that, the thread is downloading.</p>
  
  <p>So, the question is how do I print multiline progress report like the one that I illustrated above in python?</p>
  
  <p>Thanks in advance.</p>