[C++-sig] import function execution

Nicodemus nicodemus at esss.com.br
Tue Jan 25 12:26:02 CET 2005


Hi Oliver,

Just call the function inside BOOST_PYTHON_MODULE:

BOOST_PYTHON_MODULE(mymodule)
{
   my_init_function();

   ...
}

HTH,
Nicodemus.


Olivier Ravard wrote:

> Hi,
>  
> How to define a C++ function that will be executed automaticaly
> when the module is imported ?
>  
> Thanks.
>  
> O.R.
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>C++-sig mailing list
>C++-sig at python.org
>http://mail.python.org/mailman/listinfo/c++-sig
>  
>



More information about the Cplusplus-sig mailing list