Quality assurance in Python projects containing C modules
stefan_ml at behnel.de
Mon Mar 10 16:09:05 CET 2008
Duncan Booth wrote:
> NoelByron at gmx.net wrote:
>> We are thinking about writing a project for several customers in
>> Python. This project would include (among others) wxPython, a C/C++
>> module. But what happens if this application generates a segmentation
>> fault on a customers PC. What changes do we have to trace back the
>> source of the error? Imagine you use two or three C libraries in a
>> Python project and you experience random crashes in 'Python.exe'. What
>> would you do?
> I would start by ensuring that any DLLs you write are written using Pyrex
> or Cython: almost always problems with C libraries called from Python are
> due to faulty reference counting but if you keep all of your Python related
> code in Pyrex/Cython modules the reference counting problem should be taken
> care of for you. You can call any required C/C++ code from the Cython code.
I think the OP meant to use wxPython as an external module, in which case he
has no way of influencing the language it is implemented in.
My personal experience with wxPython has its ups and downs. Specifically when
it comes to crashes, I wouldn't bet my life on it. (but then, the OP aims for
using Windows anyway, so maybe there are ways to hide the crash of wxPython
behind a full-fledged system crash to avoid being blamed...)
More information about the Python-list