Home > Uncategorized > Python: Porting a C extension from Python 2 to Python 3.

Python: Porting a C extension from Python 2 to Python 3.

May 13, 2012

Several of Python’s internal API’s were removed from Python3.  PyString_* has been replaced with PyUnicode_* and PyByte_*.  PyInt_* has been replaced with PyLong_*.   Several other internal structures have changed including the Module definition.

The following link describes mechanisms for building a C extension against both Python 2 and Python 3:

http://python3porting.com/cextensions.html

Advertisements
Categories: Uncategorized
%d bloggers like this: