[C++-sig] Re: instantiating python objects within C++
David Abrahams
dave at boost-consulting.com
Tue May 27 14:44:31 CEST 2003
Gavin Doughtie <gavin at doughtie.com> writes:
> So, I don't understand still --
>
> If I want to
>
> 1) Write a class in C++
> 2) Write a wrapper class so that I can override its virtual functions
> in Python
> 3) Instantiate the C++ class with an arbitrary Python script that
> implements one of the overridden virtual functions *from C++*
> and
> 4) Call the virtual function from C++ and get the Python implementation
>
> I don't have to run the interpreter myself? boost::python will somehow
> do this for me???
No, the fact that you want to use a Python script in step 3 rules out
that possibility. From his posting it wasn't clear that Stefan had
the same requirement, though.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list