I am trying to use Python with debug symbols so I can peak into it when I
get runtime errors related to Boost.Python wrappers. I can't seem to get
this to work. I think this is more a building thing than anything else so
I figure I'd share what I've done:
1. Acquire the source for Stackless Pyth
On 02/12/2012 01:34 PM, Guillaume Carbonneau wrote:
Hi,
I'm having compilation errors as soon as I give my classes member
variables that come from the boost thread library.
Wrapping those in shared_ptr seems to work.
Any idea why? Is there a special wrapping directive I should give it to?
Th
On 02/12/2012 01:34 PM, Guillaume Carbonneau wrote:
> Hi,
>
> I'm having compilation errors as soon as I give my classes member
> variables that come from the boost thread library.
> Wrapping those in shared_ptr seems to work.
By default, boost.python treats objects as copyable. That doesn't work
On 02/12/2012 01:25 PM, Avi Bahra wrote:
Does boost python support context management using the with
statement? In my case I need to manage __enter__/__exit__ on
the c++ side. Could not find any examples for this in the
documentation.
Do you mean that you want to create an object that *has* _
Hi,
I'm having compilation errors as soon as I give my classes member variables
that come from the boost thread library.
Wrapping those in shared_ptr seems to work.
Any idea why? Is there a special wrapping directive I should give it to?
#include
#include
#include
struct Hello {
Hello(){}
On 02/12/2012 01:01 PM, VáclavŠmilauer wrote:
Will std::shared_ptr just work also?
I asked this question some time ago here:
http://stackoverflow.com/questions/6568952/c0x-stdshared-ptr-vs-boostshared-ptr
To summarize: you need to define free get_pointer functions for T=your
shared_ptr type an
Does boost python support context management using the with
statement? In my case I need to manage __enter__/__exit__ on
the c++ side. Could not find any examples for this in the
documentation.
Any help appreciated.
Best regards,
Ta,
Avi
___
Cplusp
On 02/12/2012 12:49 PM, Václav Šmilauer wrote:
I wrote a custom to-python converter for an aligned struct (It is a
128-bit aligned vector type from the http://eigen.tuxfamily.org
library). I followed
http://www.boost.org/doc/libs/1_39_0/libs/python/doc/v2/faq.html#custom_string),
the converter lo
> One could imagine writing a fancy converter that would allow the first
> form by making a temporary std::vector, passing that to the C++
> function, and then copying the elements in the vector back into the
> Python list. But that's potentially a very expensive sequence of
> operations, and
> Will std::shared_ptr just work also?
I asked this question some time ago here:
http://stackoverflow.com/questions/6568952/c0x-stdshared-ptr-vs-boostshared-ptr
To summarize: you need to define free get_pointer functions for T=your
shared_ptr type and it will work. I eventyallu did not go that way
I wrote a custom to-python converter for an aligned struct (It is a
128-bit aligned vector type from the http://eigen.tuxfamily.org
library). I followed
http://www.boost.org/doc/libs/1_39_0/libs/python/doc/v2/faq.html#custom_string),
the converter looks like this:
class AlignedType{ /*...
11 matches
Mail list logo