pass bool values to the Python function in embedded python 3.0

BigHand heweiwei at
Sat Mar 7 10:38:29 CET 2009

Guys, How do I transfer the parameters ?
in python code:
traceback.format_exception(exc_type, exc_val, exc_tb, 2, True)

in C++ code:
obFunc_format_exception = PyObject_GetAttrString(modTB,
tbArgs = Py_BuildValue("OOOii", exc_type, exc_value, exc_tb, 2, 1);
tbResultList = PyObject_CallObject(obFunc_format_exception , tbArgs);

how do I pass True to the Python function in the C++ code?

More information about the Python-list mailing list