title: using subprocess.call to read output of c executable print statement realtime
body: <p>I have a c executable which gets data from a iot hardware and print information on console using printf. I want to run this executable from python which I am able to do so using subprocess.call in following way</p>
  
  <pre><code>subprocess.call(["demoProgram", "poll"])
  </code></pre>
  
  <p>and print the output to console. But I need to capture this output(printf) using my python code to process information further in real time. How can I capture this output using subprocess in real time?</p>