Re: [C++-sig] boost python calling conventions support patch submission (__stdcall, __cdecl, __fastcall)

2010-01-20 Thread Nicolas Lelong
> Please file a trac ticket at svn.boost.org so that this does not get lost. OK Ravi, thanks for the pointer, I should have known I submitted ticket #3833 (https://svn.boost.org/trac/boost/ticket/3833), and will be happy to have feedback about it ! Cheers, Nicolas. _

[C++-sig] Py++/boost::python: How to correctly wrap libraries (DLLs) with dependencies on each other.

2010-01-20 Thread mtn
Hi all, I try to embed a Python interpreter into my project using Py++/boost::python. I have a problem wrapping different libraries for which i own the source and which I compile to DLL/*.so files . The libraries have dependencies on each other but do not necessarily have to be used together.

Re: [C++-sig] Returning a simple char *

2010-01-20 Thread Nicolas Lelong
IMO, the easiest route would be to wrap the member functions : namespace { std::string video_getDeviceName_wrapped(int deviceID) { char* name = videoInput::getDeviceName(devideID); std::string result(name); // free 'name' memory if needed return result; } } and then :: using namespace

Re: [C++-sig] Py++/boost::python: How to correctly wrap libraries (DLLs) with dependencies on each other.

2010-01-20 Thread Roman Yakovenko
On Mon, Jan 11, 2010 at 6:15 PM, mtn wrote: > > Hi all, > > I try to embed a Python interpreter into my project using > Py++/boost::python. > > I have a problem wrapping different libraries for which i own the source and > which I compile to DLL/*.so files . The libraries have dependencies on each

Re: [C++-sig] Py++/boost::python: How to correctly wrap libraries (DLLs) with dependencies on each other.

2010-01-20 Thread Martin Seiler
Thanks a lot Roman, everything answered.. On Wed, Jan 20, 2010 at 9:22 AM, Roman Yakovenko wrote: > On Mon, Jan 11, 2010 at 6:15 PM, mtn wrote: >> >> Hi all, >> >> I try to embed a Python interpreter into my project using >> Py++/boost::python. >> >> I have a problem wrapping different libraries

[C++-sig] Boost-python/pybindgen and wrapping member variables

2010-01-20 Thread Ben Fitzpatrick
Hi everyone, I think I'm finally getting the hang of this, I seem to have gotten almost everything in my project working thanks to Gustavo's latest pybindgen patch. One of the remaining things I am having difficulty with is putting annotations on member variables of a class. I have something of

Re: [C++-sig] Boost-python/pybindgen and wrapping member variables

2010-01-20 Thread Gustavo Carneiro
On Wed, Jan 20, 2010 at 5:43 PM, Ben Fitzpatrick < bfitzpatr...@vtiinstruments.com> wrote: > Hi everyone, > > > > I think I’m finally getting the hang of this, I seem to have gotten almost > everything in my project working thanks to Gustavo’s latest pybindgen patch. > One of the remaining things

Re: [C++-sig] Boost-python/pybindgen and wrapping member variables

2010-01-20 Thread Ben Fitzpatrick
Gustavo, I think you win some sort of prize for not only fastest mailing list responses, but also fastest implementation of features. I reviewed the diff, and changed what I was adding to the global annotations table for these pointers to “{‘return_internal_reference’:’true’}” – this seems to b

[C++-sig] Arrays to python

2010-01-20 Thread Ng, Enrico
I have C code similar to the following: float image_data[IMAGE_SIZE]; const float *get_data() get_data returns a pointer to image_data. I'd like to expose get_data to python and have it return a copy of the array in some Python type. (it is actually a 2D array of image data) In the wrapper

Re: [C++-sig] Boost-python/pybindgen and wrapping member variables

2010-01-20 Thread Gustavo Carneiro
On Wed, Jan 20, 2010 at 7:26 PM, Ben Fitzpatrick < bfitzpatr...@vtiinstruments.com> wrote: > Gustavo, > > > > I think you win some sort of prize for not only fastest mailing list > responses, but also fastest implementation of features. I reviewed the diff, > and changed what I was adding to the

Re: [C++-sig] Arrays to python

2010-01-20 Thread Jim Bosch
On Wed, 2010-01-20 at 17:51 -0500, Ng, Enrico wrote: > I have C code similar to the following: > > float image_data[IMAGE_SIZE]; > const float *get_data() > > get_data returns a pointer to image_data. I'd like to expose get_data to > python and have it return a copy of the array in some Python