CodePy is a C/C++ metaprogramming toolkit for Python. It handles two aspects of native-code metaprogramming:
Both capabilities are meant to be used together, but also work on their own. In particular, the code generation facilities work well in conjunction with PyCuda. Dynamic compilation and linking are so far only supported in Linux with the GNU toolchain.
See the Manual.
Having trouble with CodePy? Feel free to shoot me an email.
CodePy may be downloaded from its Python Package Index page or obtained directly from my source code repository by typing
git clone http://git.tiker.net/trees/codepy.git
You may also browse the source.
CodePy has no prerequisites other than Python 2.4. Some additional functionality is available if Boost.Python is installed, which is part ofBoost C++ (any recent version should work).
I'm happy to announce the initial public release of CodePy, a native-code Metaprogramming toolkit for Python.
The idea is the following:
Ta-da: Instant native-code performance, with no explicit pre-compilation step. CodePy can also help you with the generation of the code, by letting you build a data structure and turning that into C code. CodePy works well with Boost.Python and PyCuda. In conjunction with the latter, it offers an easy way of doing GPU Metaprogramming, a very effective tuning technique for the GPU.