Quality assurance in Python projects containing C modules

Stefan Behnel stefan_ml at behnel.de
Mon Mar 10 20:15:19 CET 2008


Duncan Booth wrote:
> Stefan Behnel <stefan_ml at behnel.de> wrote:
>> Duncan Booth wrote:
>>> 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.
> 
> The OP mentioned 'two or three C libraries', so I assume wxPython is only 
> part of the story.

Ah, sorry, I missed that. Sure, if it's about integrating C/C++ libraries as
Python modules, then I second the recommendation of using Cython.

Stefan



More information about the Python-list mailing list