title: Python subprocess?
body: <p>I think I might be repeating the question but I didn't find any of the answers suited to my requirement.
  Pardon my ignorance.</p>
  
  <p>I have a program running which continuously spits out some binary data from a server.It never stops until it's killed.</p>
  
  <p>I want to wrap it in a python script to read the output and process it as and when it arrives.
  I tried out few of the subprocess ideas in stack overflow but no use.
  Please suggest.</p>
  
  <pre><code>p=subprocess.popen(args,stderr=PIPE,stdin=PIPE,stdout=PIPE,shell=FALSE)
  #p.communicate#blocks forever as expected
  #p.stdout.read/readlines/readline--&gt;blocks
  #select(on p.stdout.fileno())--&gt;blocks
  </code></pre>
  
  <p>what is the best method?</p>