[C++-sig] Way to insert code in _main.cpp in pyste

Nicodemus nicodemus at globalite.com.br
Sun Sep 21 03:45:47 CEST 2003


Hi Niall,

Niall Douglas wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>I'd really like a way of inserting code into _main.cpp automagically. 
>Basically I have a list of converters which need to be registered 
>with boost.python just after the BOOST_PYTHON_MODULE() and if one 
>could specify a list of functions (eg; RegisterConvFXString(), 
>RegisterDefines() etc) on the command line then that would be really 
>cool.
>  
>

Must it be after BOOST_PYTHON_MODULE? If not, you can use the function 
declaration_code(<code>) in your Pyste file. To insert code inside 
BOOST_PYTHON_MODULE, use module_code().

Regards,
Nicodemus.





More information about the Cplusplus-sig mailing list