How can I catch segmentation fault in python?

justin justpark78 at gmail.com
Wed Nov 17 00:26:19 EST 2010


Hi all,

I am calling a program written in C inside Python using ctypes,
and it seems that sometimes the program in C crashes while it's being
used in Python.
Even under the circumstances, I want to get the Python program going
by handling the segmentation fault.

I've already searched the Internet, but couldn't get the right answer
to catch them.
Could any of you please let me know how to deal with this and catch
the segmentation fault in Python?

Thanks,
Justin.



More information about the Python-list mailing list