How to catch an exception thrown in ctypes?

Posted by Paul McGuire on Stack Overflow See other posts from Stack Overflow or by Paul McGuire
Published on 2010-05-16T14:32:58Z Indexed on 2010/05/16 14:40 UTC
Read the original article Hit count: 262

I am working with some C code called from Python using ctypes. Somewhere in the bowels of the C library, an exception is occurring and/or abort() is being called. Is there any way I can catch this in my Python caller code? (Platform is Linux)

© Stack Overflow or respective owner

Related posts about python

Related posts about ctypes