One very useful feature for fast prototyping of code is weave.inline, which allows one to compile inline chunks of code on the fly. Specialized code is compiled based on the types of inline variables (pulled from the surrounding scope), and cached for later use. A simple usecase would be
cython.inline("print x*x", x=3)
To get a result back, the return statement is used, e.g.