C/C++ to Python translater

Fernando Pérez fperez528 at yahoo.com
Fri Mar 1 13:06:22 CET 2002

kevin parks wrote:

> Is there a translator to automatically port (rewrite) code snippets
> from C or C++ to Python? I have some old C code that i have been
> porting by hand (well by head really) and i was wondering if there
> were any translation utilities that i could try. I imagine that this
> would be a monster AI undertaking, Btu with Python's powerful built-in
> types i am guessing c --> Python is easier than the opposite.

Yes, almost. It doesn't translate it, but you can embed the C/C++ in your 
python source code:


Besides, there's various systems for wrapping complete libraries as modules 
with minimal effort. google(swig,sip,boost.python,siloon) will help.



More information about the Python-list mailing list