7

What are various tools to convert Python scripts to C. I am mainly looking at speed of such tools/converter/interpreter.

Thanks, -J

Jay D
  • 3,263
  • 4
  • 32
  • 48

3 Answers3

8

cython is what you are looking for http://www.cython.org/

Bander
  • 341
  • 2
  • 5
3

Mark Dufour's Shedskin is an interesting alternative, that can parse a large subset of python, and translate it to C++. The project also has a really good blog

Andrew Walker
  • 40,984
  • 8
  • 62
  • 84
1

You could use Pypy to translate a subset of Python language to C.

yagmoth555
  • 193
  • 3
  • 11
jfs
  • 399,953
  • 195
  • 994
  • 1,670
  • 2
    Subset *means* subset. Very little useful Python code will pass as RPython unmodified, and 99% will become very ugly (compared to full Python) when converted to RPython. RPython is a quite different programming language that Python interpreters happen to accept. –  May 20 '12 at 14:43