[python-ldap] One vote for 3.x
michael at stroeder.com
Thu Dec 1 09:50:59 CET 2011
Christian Heimes wrote:
> Am 29.11.2011 14:42, schrieb Chris Dukes:
>> My two cents for anyone wanting to start on it.
>> 1) Start by either getting _ldap.so to work with python 3.x, *OR*
>> replace _ldap.so with pure python calling 'ctypes' that maintains close
>> to the same interface. The latter will probably be quicker to develop.
>> The former will work on less loved OSes like AIX.
> *OR* use Cython  to interface with libldap. I've tried both ctypes
> and Cython in the past. Nowadays I use Cython exclusively to optimized
> code and interfacing with C/C++ libraries. Cython is a great tool
> because it takes care of all the boiler plate stuff you don't want to
> write manually. Cython looks like Python code with some C annotations.
> Anybody with basic knowledge of C and Python can understand and modify
> the code -- you don't need to know the Python C API. Carefully written
> Cython code compiles to C extensions for every major version of CPython
> from 2.4 to 3.2 without additional work.
This sounds very interesting.
But don't you then need Cython installed to build a certain module?
And how about pre-compiled binaries? Do they need extra Cython parts shipped
along with them?
More information about the python-ldap