Possible Duplicate:
Calling Python functions from C++
I'd like to make Python binding in my application using boost::python library. After reading documentation I realized it's quite simple to make a new object with functions that will call C++ functions. Although, I'd like to make something different.
Let say I have a function that triggers when player uses an item in-game, I'd want it to call a Python file which would look like:
def onUse(player, item, position): //my code here
How would I make it using boost::python? I mean, how would I create an 'onUse' function with pre-defined parameters and how would I make my C++ function to call the 'onUse' in Python file?