traceback over C API - still not working...
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Sat Oct 20 18:34:26 EDT 2007
En Sat, 20 Oct 2007 14:47:52 -0300, Sami Vaisanen <ensiferum_ at hotmail.com>
escribi�:
> This is becoming utterly painful process.... I found out that the return
> value from "format_exception" function is NOT a list, i.e. PyList_Check()
> fails. PySequence_Check() succeeds but then PySequence_List() gives me
> back -1. So wtf?
It seems very unlikely, since the traceback module is written in Python.
It clearly returns a list.
> py_ref fun(PyObject_GetAttrString(module.get(),
> "format_exception"));
> if (fun)
> list = PyObject_CallFunctionObjArgs(type, value, trace,
> NULL);
Of course, you get a list if you actually call the function...
--
Gabriel Genellina
More information about the Python-list
mailing list