Boost logo

Boost Users :

Subject: Re: [Boost-users] Copy of a C++ object extended with Boost.Python
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-08-27 18:19:58


On Thu, Aug 27, 2009 at 10:46 AM, 4ian<dark4ian_at_[hidden]> wrote:
> I'm afraid I'm unable to find this class or anything that can help me
> to copy the Python __dict__ associated with my C++ object...
>
> On 25 août, 21:55, OvermindDL1 <overmind..._at_[hidden]> wrote:
>> On Tue, Aug 25, 2009 at 3:52 AM, 4ian<dark4..._at_[hidden]> wrote:
>> > Thanks for you response !
>> > When you say "that one wrapper helper", are you speaking about the
>> > object class of Boost.python, or about a home made class ?
>>
>> Neither.  I do not recall the name of it, but you can subclass your
>> class from it, then anytime your class has a python object containing
>> it then you can use some getself comand or something like that, it is
>> in the docs somewhere (but I am not in a good position to look at the
>> docs right now, maybe tonight if you have not found it yet).

Found it, it is in the FAQ, apparently the wrapper class I used was
one I made, but it talks about how to make it there, and an
alternate/better method if you are using shared_ptr:
http://beta.boost.org/doc/libs/1_40_0/libs/python/doc/v2/faq.html#xref


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