Advice on Python C modules

Mike Rovner mike at
Tue Dec 2 21:09:46 CET 2003

Torsten Marek wrote:
> I think about rewriting one C++ library with Python wrappers (by sip)
>   to a pure Python module (because I just use it from Python).
> I have to create custom types and inherit from those custom types.
> Is it better to use pure C for that module, Pyrex or should I stay
> with my current library (which has to be modified for some other
> reasons, too)?

It seems to me that you contradict yourself here.
Pure python is pure python without any c, c++, pyrex, sip, etc.
OTOH, if you still need compiled extension for some reason
(usualy only two excuses are good enough- speed and low-level
interface to something as hardware or 3rd party libraries)
why throw out good working code? It's not a good practice.

So if you don't *have to* use compiled extension you can ask how to achieve
desired results in pure python.


More information about the Python-list mailing list