Calling python function form C++ passing a dictionary

Michael Andersson a98mican at
Thu Jan 30 21:52:38 CET 2003

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,

More information about the Python-list mailing list