Calling python function form C++ passing a dictionary
Michael Andersson
a98mican at ida.his.se
Thu Jan 30 15:52:38 EST 2003
Hi!
I'm trying to call a python function form my c++ program but the
function is never called. The function expect a dictionary as an
argument so the call from C++ looks like this:
PyObject* dict = PyDict_New();
PyObject *time = PyInt_FromLong(0);
PyDict_SetItemString(dict, "time", time);
PyObject_CallObject(function, dict);
It works fine for tuples but not for dictionarys.
Any ideas?
Best regards,
/Michael
More information about the Python-list
mailing list