title: reading from a pipe -- stateful or stateless
body: <p>I need to write a python script that processes the output of a another program. i.e. I have to do:</p>
  <pre><code>./other_program | ./my_scripts.py 
  </code></pre>
  <p>My question is whether this <code>my_script.py</code> is <code>state-less</code>. For example can I remember the last line of output I processed that came out of <code>./other_program</code>, or the script will only process current line, completely unaware of last line?</p>