C/C++ to Python translater

Edward K. Ream edream at tds.net
Sat Mar 2 13:13:40 EST 2002


kevin parks wrote:
> 
> Is there a translator to automatically port (rewrite) code snippets
> from C or C++ to Python? 

leo.py contains a script called c2py.py that I have used to translate
all my C++ code to Python.  It does about 80% of the work and is mostly
intended to be run from inside Leo.  IIRC there is another entry in
c2py.py script to translate "exterior" files and this can be run from
idle, say.  Munging source to Python is actually remarkably easy to do. 

You can download leo.py v1.0 at:

  http://sourceforge.net/project/showfiles.php?group_id=3458

One of these days I'll get around to cleaning it up and making a proper
distribution of it.  Let me know if you have problems with c2py: it will
help me clean up the rough edges.

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  edream at tds.net
Leo: Literate Editor with Outlines
Leo: http://personalpages.tds.net/~edream/front.html
--------------------------------------------------------------------



More information about the Python-list mailing list