pass bool values to the Python function in embedded python 3.0

BigHand heweiwei at gmail.com
Sat Mar 7 04:38:29 EST 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,
"format_exception");
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