Re: Inconsistency in retrieving exceptions via sys module

2008-05-12 Thread Gabriel Genellina
En Mon, 12 May 2008 13:47:45 -0300, Raj Bandyopadhyay <[EMAIL PROTECTED]> escribió: I am writing some C code which sets and retrieves a Python exception. I set the exception using PyErr_SetString(), and retrieve it in 2 ways: 1) using PyErr_Occurred() and 2) Using sys.exc_type. However, I get

Inconsistency in retrieving exceptions via sys module

2008-05-12 Thread Raj Bandyopadhyay
Hi I am writing some C code which sets and retrieves a Python exception. I set the exception using PyErr_SetString(), and retrieve it in 2 ways: 1) using PyErr_Occurred() and 2) Using sys.exc_type. However, I get two different results and am very puzzled by this apparent inconsistency. Could