[C++-sig] Re :Re: back-embedding... is this possible?
Roman Yakovenko
roman.yakovenko at gmail.com
Mon Jul 10 14:11:06 CEST 2006
On 7/10/06, blairs at free.fr <blairs at free.fr> wrote:
>
> I can create the instance in python with
> PyRun_String("a =A()");
> then handle a in C++ with
> A& a = extract<A&>(main_namespace["a"]);
>
> but I don't get it from this tutorial how to create the instance in c++ then
> handle it in python
boost::shared_ptr<A> a( new A() );
boost::python::object py_a( a );
Now, I think, you have to inject py_a to appropriate scope.
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
More information about the Cplusplus-sig
mailing list