title: Run C program from Python and then capture output
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4743748/how-do-i-connect-a-python-and-a-c-program">How do I connect a Python and a C program?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a C program that takes two args and outputs a number.</p>
  
  <p>./a.out 2 3 (for example). It does some computational expensive operations, so I was wondering could I use Python's multiprocessing library to run a bunch of the C programs and then compile all the numbers into a list or table or some data structure?</p>
  
  <p>Thanks,</p>
  
  <p>This is not a duplicate because my questions is how can i do it IN PARALLEL EX. MANY THREADS!</p>