title: How to read binary data via pipe in python
body: <p>What do I need do to make sure the data is read as binary and not text
  when i do</p>
  
  <pre><code>cat binfile | myscript.py
  </code></pre>
  
  <p>reads as text mode I need binary mode?</p>
  
  <pre><code>data = sys.stdin.read 
  </code></pre>