Sunday, November 22, 2009

2to3c: an implementation of Python's 2to3 for C code

"2to3c: an implementation of Python's 2to3 for C code"

See for a description of this tool.

It works on C modules. So it should be easier for people to do ports to py3k for their C modules.

The 2to3c tool uses Coccinelle for transformations on the C code. This program has been used for linux, and other software... for updating code when their APIs change.

The perfect fit for the python C API changes!

1 comment:

Edward K. Ream said...

The first python script I ever wrote was c2py: a program that eased the migration of C++ code to Python code.

I used it to port the Borland C version of Leo to Python. It did maybe 80% of the grunt work involved.

For details, see scripts.leo in the Leo distribution.

Edward K. Ream