Boost Python : Generic Function Call

Hi, I would like to find a way to call Python functions from C++ in a generic way. With Python you can use PyObject_CallObject( PyObject* pFun, PyObject* pyArg ) where pyArgs is a tuple, this allows the user to genericaly call Python functions assuming that you create the right tuple before calling PyObject_CallObject. With boost python i tried to do the same thing but i can't find a way to do it, using the call function or directly the () operator i always have to pass all the arguments. Is there a easy way to do that using boost python ? -- View this message in context: http://www.nabble.com/Boost-Python-%3A-Generic-Function-Call-tp18431821p1843... Sent from the Boost - Users mailing list archive at Nabble.com.

on Sun Jul 13 2008, William Marié
Hi,
I would like to find a way to call Python functions from C++ in a generic way. With Python you can use PyObject_CallObject( PyObject* pFun, PyObject* pyArg ) where pyArgs is a tuple, this allows the user to genericaly call Python functions assuming that you create the right tuple before calling PyObject_CallObject. With boost python i tried to do the same thing but i can't find a way to do it, using the call function or directly the () operator i always have to pass all the arguments.
Is there a easy way to do that using boost python ?
I suggest asking on the c++-sig: http://www.boost.org/community/groups.html#cplussig -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (2)
-
David Abrahams
-
William Marié