문제

I have a Python code calling some C code (.so file).

Is there a way, from within the C code, go get the line number it has been called from at the Python side?

도움이 되었습니까?

해결책

I eventually found the PyFrame_GetLineNumber(PyFrameObject *f) C function, whose source is located in frameobject.c.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top