Python2CPP ?

Ben C spamspam at spam.eggs
Wed Apr 12 08:44:30 EDT 2006


On 2006-04-12, Michael Yanowitz <m.yanowitz at kearfott.com> wrote:
> Hello:
>
>    One topic that has always interested me are the Language translators.
> Are there any that convert between Python and C++ or Python and Java?
> I remember seeing one that converts from Python to or from Perl but couldn't
> find it on a quick google search. I did find a Python2C
> http://sourceforge.net/projects/p2c/ and I found:
> http://www.strout.net/python/ai/python2c.py  which are obviously incomplete.
>    I know there have been many discussions recently regarding C and C++.
> I am (or is it - was?) a C/C++ programmer for over 15 years. Just started
> with Python as we need to write come quick code in script form which can
> be generated and run through an interpreter.
>    If not could there be a converter from Python to/from Language X and
> from Language X to/from C or C++?

I've heard of an incomplete Python to C++ translator called "Shedskin"

http://pycode.com/modules/?id=40&PHPSESSID=1919541171352770795c2bcee95b46bd

There's also a GNU project afoot for a Python to Scheme translator which
I saw on http://savannah.gnu.org but now cannot find. This would be an
interesting project, I suppose you'd write it in Python, then it could
bootstrap itself into Scheme and C.

Scheme can be translated to C using chicken:

http://www.call-with-current-continuation.org/index.html



More information about the Python-list mailing list