title: How can you display the results of a script in real-time for a Django 1.4 website?
body: <p>So after finding out how to display the results of scripts on a Django website, I thought I'd be able to display the likes of live CPU information using SAR however whenever I change my code and refresh the webpage it doesn't load up and constantly looks like it's trying to load the webpage.</p>
  
  <p>The only thing I've managed so far is to run the SAR command in a terminal, parse the results to a text file and then print out the text file using </p>
  
  <pre><code>import os
  
  from django.shortcuts import render
  
  
  def dashboard(request):
  
      output = os.popen('cat measurements.txt').read()
      return render(request,'dashboard/geckoboard.html', {'output': output})
  </code></pre>
  
  <p>However this doesn't give me live data, just whatever was the most recent recording at the time of refreshing the webpage.</p>
  
  <p>What I want is to be able to monitor the performance in real time. I think I've seen in the past where you can go through a static file and pretend it's live for demos but that's not what I need.</p>