Catching a segfault in a Python library

Ayaz Ahmed Khan ayaz at dev.null
Sat Nov 24 03:41:24 EST 2007


Donn Ingle wrote:
> Already done, the code within PIL is causing the crash. It gets ugly and
> out of my remit. It's a freetype/Pil thing and I simply want to a way to
> catch it when it happens.
>  Since a segfault ends the process, I am asking about "wrappers" around
>  code
> to catch a segfault.
> 
> \d

Wouldn't it be better to narrow down to what in your code is invoking PIL 
in a manner in which PIL exhibits such behaviour, and handle it within 
your code?

Just a thought!

-- 
Ayaz Ahmed Khan



More information about the Python-list mailing list