| Introduction

## 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.

## Example

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:

- Functions
- Classes
- Class Templates
- Virtual Methods
- Overloading
- Attributes
- Enums (both "free" enums and class enums)
- Nested Classes

Copyright © 2003 Bruno da Silva de Oliveira
Copyright © 2002-2003 Joel de Guzman
Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies. This document is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.