Quality assurance in Python projects containing C modules
Duncan Booth
duncan.booth at invalid.invalid
Mon Mar 10 10:18:48 EDT 2008
NoelByron at gmx.net wrote:
> Hello!
>
> 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.
More information about the Python-list
mailing list