Re: [C++-sig] Exposing members of members

2009-01-20 Thread David Abrahams
on Tue Jan 20 2009, Ricardo Abreu wrote: > Thank you very much for your answer, but what I really wanted was to expose > to Python > just the first element of the pair and not the whole pair, so that the fact > that it is > a pair in c++ would be transparent to python. Looks like you want to

[C++-sig] [ANN] Py++ based ctypes code generator

2009-01-20 Thread Roman Yakovenko
Hello. I would like to announce a new code generator for ctypes package. The new code generator is integrated with Py++ package and reuse most of its infrastructure: * GCC-XML - generates an XML description of a C++ program from GCC's internal representation * pygccxml - powerful and simpl

Re: [C++-sig] Exposing members of members

2009-01-20 Thread Ralf W. Grosse-Kunstleve
> Thank you very much for your answer, but what I really wanted was to> expose > to Python just the first element of the pair and not the whole> pair, so that > the fact that it is a pair in c++ would be transparent> to python. For > instance, if I had struct A{std::pair a;};, > I just wanted to

Re: [C++-sig] create boost array from a Numpy PyArray without copying data?

2009-01-20 Thread Ravi
On Tuesday 20 January 2009 04:27:02 Sebastian Walter wrote: > Thanks for the hint :), > Your code is a little to heavyweight for my purposes, > but I learned quite a lot how boost::python converters work. > > And it also gave me the idea that finally solved my problem! Good. > // global to guaran

Re: [C++-sig] Exposing members of members

2009-01-20 Thread Ricardo Abreu
Hello, Thank you very much for your answer, but what I really wanted was to expose to Python just the first element of the pair and not the whole pair, so that the fact that it is a pair in c++ would be transparent to python. For instance, if I had struct A{std::pair a;};, I just wanted to ex

Re: [C++-sig] create boost array from a Numpy PyArray without copying data?

2009-01-20 Thread Sebastian Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Thanks for the hint :), Your code is a little to heavyweight for my purposes, but I learned quite a lot how boost::python converters work. And it also gave me the idea that finally solved my problem! I don't have to convert the PyArray to boost::