title: Calling C functions in Python
body: <p>I have a bunch of functions that I've written in C and I'd like some code I've written in Python to be able to access those functions. </p>
  
  <p>I've read several questions on here that deal with a similar problem (<a href="https://stackoverflow.com/questions/145270/calling-c-c-from-python">here</a> and <a href="https://stackoverflow.com/questions/5090585/segfault-when-trying-to-call-a-python-function-from-c">here</a> for example) but I'm confused about which approach I need to take. </p>
  
  <p>One question recommends ctypes and another recommends cython. I've read a bit of the documentation for both, and I'm completely unclear about which one will work better for me. </p>
  
  <p>Basically I've written some python code to do some two dimensional FFTs and I'd like the C code to be able to see that result and then process it through the various C functions I've written. I don't know if it will be easier for me to call the Python from C or vice versa.</p>