Instant C/C++ in Python
>>> c_code = """
double sum(double a, double b){
return a+b;
}
"""
>>> import Instant
>>> ext = Instant.Instant()
>>>
>>> # create the wrapper code, compile and link it to a shared library
>>> ext.create_extension(code=c_code, module='test1_ext')
>>> from test1_ext import sum
>>>
>>> # use the C code
>>> print sum(3.7, 4.8)
8.5
It creates C source code as a Python String, only to compile it in 3 lines! Compile something else, 1 more line!!
Import the newly created compiled module, takes 1 extra line, but i guess everyone can live with that.