title: Getting information of subprocess execution to update a progress bar in django
body: <p>I'm trying to do a loading page with a progress bar in my django app while a process is running in background.</p>
  
  <p>This is my view:</p>
  
  <pre><code>def getor(request):
  # get video
      var = Video.objects.order_by('id').last()
      v = '/home/myproject/media/'+ str(var)
  # process
      p = subprocess.Popen("./process.sh %s" % (str(v)),stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True)
      return render(request, 'progressbar.html')
  </code></pre>
  
  <p>I have done the progress bar frontend part. 
  How I can get this percentages generated by the execution of process.sh in my django view so that i can give it to my template for the evolution of the progress bar ?
  <a href="https://i.stack.imgur.com/8FCCs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8FCCs.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Hu7Ny.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hu7Ny.png" alt="enter image description here"></a></p>