|
Boost Users : |
From: Robert Dailey (rcdailey_at_[hidden])
Date: 2008-02-11 14:01:12
Slight correction. I meant:
object mainmod = import( "pythontest" );
I find now that this does not work and actually causes an access violation
in my application.
On Feb 11, 2008 12:54 PM, Robert Dailey <rcdailey_at_[hidden]> wrote:
> Wouldn't this work instead of calling PyImport_AppendInittab():
>
> static void DoFoo()
> {
> }
>
> using namespace boost::python;
>
> BOOST_PYTHON_MODULE(pythontest)
> {
> def( "DoFoo", DoFoo );
> }
>
> void SetupPython()
> {
> object import( "pythontest" );
> }
>
> Notice how I'm importing the "pythontest" module. I want to use
> Boost.Python where ever I can, and in the embedding.cpp example they use
> the Python API directly to import the embedded module.
>
> Thanks.
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net