| Inserting Code

You can insert arbitrary code in the generated cpps, just use the functions `declaration_code` and `module_code`. This will insert the given string in the respective sections. Example:

`

        ##file A.pyste
        Class("A", "A.h")
        declaration_code("/* declaration_code() comes here */\n")
        module_code("/* module_code() comes here */\n")

`

Will generate:

`

        // Includes ====================================================================
        #include <boost/python.hpp>

        // Using =======================================================================
        using namespace boost::python;

        // Declarations ================================================================

        /* declaration_code() comes here */

        // Module ======================================================================
        BOOST_PYTHON_MODULE(A)
        {
            class_< A >("A", init<  >())
                .def(init< const A& >())
            ;

        /* module_code() comes here */
        }

`

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)