On Mar 7, 5:38 pm, BigHand <hewei...@gmail.com> wrote:
> 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?
build the python object
tbArgs  = Py_BuildValue("OOOOO", exc_type, exc_value, exc_tb, Py_None,
Py_True);
tbResultList = PyObject_CallObject(obFunc_format_exception , tbArgs);
but I can't get the format_exception called successfully.
could anyone help me ?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to