From: moerchendiser2k3 on
Hi,

i have a serious problem and I am looking for a solution. I pass an
instance of a class from a file to PyObject_Call. When something
fails, I get a full traceback. If it succeeds, I get the return value.

Is it possible to get information from which line/file the return
value of PyObject_Call is?

Thanks!!

moerchendiser2k3
From: Steve Holden on
moerchendiser2k3 wrote:
> Hi,
>
> i have a serious problem and I am looking for a solution. I pass an
> instance of a class from a file to PyObject_Call. When something
> fails, I get a full traceback. If it succeeds, I get the return value.
>
> Is it possible to get information from which line/file the return
> value of PyObject_Call is?
>
> Thanks!!
>
> moerchendiser2k3

You'll need to use a debugger like gdb that gives you access to the C
stack, I believe.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

From: moerchendiser2k3 on
But the stack is empty after PyObject_Call, isnt it?
From: Stefan Behnel on
moerchendiser2k3, 16.03.2010 17:08:
> But the stack is empty after PyObject_Call, isnt it?

I think Steve was expecting that you wanted to debug into your program,
step into the call, and find the line yourself.

Stefan

From: Stefan Behnel on
moerchendiser2k3, 16.03.2010 12:52:
> i have a serious problem and I am looking for a solution. I pass an
> instance of a class from a file to PyObject_Call. When something
> fails, I get a full traceback. If it succeeds, I get the return value.
>
> Is it possible to get information from which line/file the return
> value of PyObject_Call is?

Could you explain what you want to do with this information and in what
cases you need it? Do you want to extract the information programmatically
at runtime?

Stefan