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,135
  • 3
  • 29
  • 47

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
  • 39,138
  • 7
  • 58
  • 82
1

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

yagmoth555
  • 193
  • 3
  • 10
jfs
  • 374,366
  • 172
  • 933
  • 1,594
  • 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