title: How to extract percentage every 10 seconds from this lines?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/13523931/how-to-show-the-rsync-progress-in-web-browser-using-django">How to show the rsync --progress in web browser using DJango?</a>  </p>
  </blockquote>
  
  
  
  <p>I have this linux command:</p>
  
  <pre><code>rsync -avz --info=progress2 source:/file /destination
  </code></pre>
  
  <p>which I have used in Python like this:</p>
  
  <pre><code>proc = subprocess.Popen(['sshpass', '-p', password, 'rsync', '-avz', '--info=progress2', source12, destination], 
                                      stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0]
  </code></pre>
  
  <p>This store the output as well as progress in proc variable like this:</p>
  
  <pre><code>receiving incremental file list
  rathi/
  rathi/20090209.02s1.1_sequence.txt.gz
      209,398,969  27%   11.95MB/s    0:00:45  
  </code></pre>
  
  <p>I only want to extract the progress percentage from the above line. I want to check the variable for each 1minute and extracts the updated percentage. For the parsing I think can use <code>re</code> module. How can I achieve my result? Thanks</p>