Frage

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?

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top