Re: pass bool values to the Python function in embedded python 3.0

2009-03-07 Thread BigHand
On 3月7日, 下午10时38分, "Gabriel Genellina" wrote: > En Sat, 07 Mar 2009 07:38:29 -0200, BigHand escribió: > > > how do I pass True to the Python function in the C++ code? > > (I've already suggested using PyErr_Print/PyTraceback_Print instead) > > See the section "Boolean Objects" in the C API Refere

Re: pass bool values to the Python function in embedded python 3.0

2009-03-07 Thread Gabriel Genellina
En Sat, 07 Mar 2009 07:38:29 -0200, BigHand escribió: how do I pass True to the Python function in the C++ code? (I've already suggested using PyErr_Print/PyTraceback_Print instead) See the section "Boolean Objects" in the C API Reference: "PyObject* Py_True The Python True object. This obj

Re: pass bool values to the Python function in embedded python 3.0

2009-03-07 Thread BigHand
On Mar 7, 5:38 pm, BigHand 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_ty

pass bool values to the Python function in embedded python 3.0

2009-03-07 Thread BigHand
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 = PyObj