title: IPC between C application and Python
body: <p>So I am relatively new to IPC and I have a c program that collects data and a python program that analyses the data. I want to be able to:</p>
  
  <ol>
  <li>Call the python program as a subprocess of my main c program</li>
  <li>Pass a c struct containing the data to be processed to the python process </li>
  <li>Return an int value from the python process back to the c program </li>
  </ol>
  
  <p>I have been briefly looking at Pipes and FIFO, but so far cannot find any information to address this kind of problem, since as I understand it, a fork() for example will simply duplicate the calling process, so not what I want as I am trying to call a different process.</p>