

Click here to view the latest version of this page.

What is Pyste?

Pyste is a Boost.Python code generator. The user specifies the classes and functions to be exported using a simple interface file, which following the Boost.Python's philosophy, is simple Python code. Pyste then uses GCCXML to parse all the headers and extract the necessary information to automatically generate C++ code.


Let's borrow the class World from the tutorial:

    struct World
        std::string greet() { return msg; }
        std::string msg;

Here's the interface file for it, named world.pyste:

    Class("World", "world.h")

and that's it!

The next step is invoke Pyste in the command-line:

python --module=hello world.pyste

this will create a file "hello.cpp" in the directory where the command was run.

Pyste supports the following features: