title: Waiting for last line from subprocess
body: <p>How can I store only the last line returned from a subprocess?</p>
  
  <p>In particular, I call a subprocess from python and it returns a lot of output lines. The subprocess terminates after some unpredictable (and possibly very long) time and I need to process only  the last line from STDOUT.</p>
  
  <p>Can I somehow avoid the storing of the whole output and just wait for the last one?</p>