Catching a segfault in a Python library

Donn Ingle donn.ingle at gmail.com
Sun Nov 25 01:36:02 EST 2007


Paul Rubin wrote:
> then maybe your trap-and-restart approach can keep things usable for a
> while.
Trap and restart gracefully is the road I want to take. If my app (FP)
chokes on a font (it will have made a note before doing what kills it,
because I know the 'danger' areas ) and then will die. The second layer
(launcher) app will then (hopefully) be returned to (after the segfault)
and it will then check the "badfont" file and start a wizard for the user
so that the fonts can be renamed/moved/killed.

This is mainly because I lack the skills to hack deeply into complex stuff
like PIL, even though a lot of it is Python, and also because the goals
keep changing as new versions of libs like PIL and Freetype come out. I'd
rather have a parachute than a scalpel :)

\d




More information about the Python-list mailing list