Exception Handling

Sheldon shejo284 at gmail.com
Thu Jan 12 12:16:18 EST 2006


I am not a c-expert, thank God! That  code drives people mad :) But I
do know that you can redirect the data stream into a variable of sorts.
Maybe you should try writing the error to a file and then read the file
with python. Python will not catch all the errors and if there is one
that you need specifically, then you will have to make your own
exception. I sent the link to you earlier. I use a large and complex
script that is an unholy elixer of C, FORTRAN, and Python. When there
is an error in the C code the command returned to python is the UNIX
process code, i.e. 0 if the c-code was executed without error or -1 for
an error. We have not tried to catch the error from the C-code. Sorry.
Perhaps some else knows how. 


More information about the Python-list mailing list