How to translate python into C

Szabolcs Nagy nszabolcs at gmail.com
Fri Oct 28 05:55:04 EDT 2005


python creates bytecode (like java classes)


you cannot translate python directly to c or machine code, but there
are some projects you probably want to look into


Pypy is a python implemetation in python and it can be used to
translate a python scrip to c or llvm code. (large project, work in
progress)
http://codespeak.net/pypy/dist/pypy/doc/news.html


Shedskin translates python code to c++ (not all language features
supported)
http://shed-skin.blogspot.com/


Pyrex is a nice language where you can use python and c like code and
it translates into c code. (it is useful for creating fast python
extension modules or a python wrapper around an existing c library)
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/




More information about the Python-list mailing list