title: Calling Python functions from C++
body: <p>I am trying to achieve call Python functions from C++. I thought it could be achieved through function pointers, but it does not seem to be possible. I have been using <code>boost.python</code> to accomplish this. </p>
  
  <p>Say there is a function defined in Python:</p>
  
  <pre><code>def callback(arg1, arg2):
      #do something
      return something
  </code></pre>
  
  <p>Now I need to pass this function to C++, so that it can be called from there. How do I write the code on C++ side using <code>boost.python</code> to achieve this?</p>