Introduction |
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
{
void set(std::string msg) { this->msg = msg; }
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 pyste.py --module=hello world.pyste
this will create a file "hello.cpp" in the directory where the command was run.
Pyste supports the following features:
Copyright © 2003 Bruno da Silva de Oliveira
Copyright © 2002-2003 Joel de Guzman
Distributed under
the Boost Software License, Version 1.0. (See accompanying file
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)