title: Communicating continuously between python script and C app
body: <p>I have a python script that interfaces with some network pool to read data from, that
  is continuously 320 bits. This 320 bits should be forward to some C app, that continuously
  reads these 320 bits from the python script and places them into an int array[8]. To be honest, I have no idea whether this is possible at all and would be thankful for a starting point for this issue.</p>
  
  <p>I tried to incooperate some of your ideas, trying to send data via stdin from python to the C app:</p>
  
  <p>test.exe:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main(void)
  {
      int ch;
      /* read character by character from stdin */
      do {
      ch = fgetc(stdin);
      putchar(ch);
      } while (ch != EOF);
  
  
      return 0;
  }
  </code></pre>
  
  <p>test.py:</p>
  
  <pre><code>def run(self):
  
      while True:           
          payload = 'some data'
          sys.stdout.write(payload)
          time.sleep(5)
  </code></pre>
  
  <p>Then I start this whole thing using a pipe: python test.py | test.exe</p>
  
  <p>Unfortunately, there is no data that is received on the test.exe side, shouldn't this data ba available on stdin?</p>