Embedding Cython
Typically Cython is used to create extension modules for use from Python programs. One may, however, one want to write a standalone program in Cython. This is done via embedding the Python interpreter with the --embed option.
Background
See also this email thread, and also more embedding discussion here and a script to "freeze" Cython modules (like Python freeze).
This page is derived from David McNab's idea for embedding Pyrex. The concepts there have been implemented in the --embed flag for Python.
Status
This has been implemented--simply run cython with the --embed option and a .c file with a main method is created and the module's name will be set to __main__. Compile the .c file linking with the Python library. Running the resulting executable execute the module.
A demo is up at http://hg.cython.org/cython/file/tip/Demos/embed.
