newbie question

Eric Jacobs none at none
Mon Apr 17 19:44:09 EDT 2000


In article <wbHK4.2614$Za1.38989 at newsc.telia.net>,
"Fredrik Lundh" <effbot at telia.com> wrote:
> Arint‚ <jamarijr at hotmail.com> wrote:
>> If i PyErr_SetString(PyExc_TypeError,"Invalid command value for IOCTL");
>> in my c/c++ program, how would python script get that error string?
> 
> return NULL to the interpreter.  do *not* return
> a python value.

That, and then do something like

try:
     ...
except TypeError, exc
     msg = exc.args[0]


in Python. I think that's what you were looking for?



More information about the Python-list mailing list