Re: [C++-sig] pybindgen: allow_subclassing option causing reference parameters to be copied?

2009-07-07 Thread J. Michael Owen
Hello Gustavo, I have some further evolved changes for the sequence methods that you may want to use over my previous version. This is more general, and involves less code as I realized I could register the sequence methods to just call the wrapped methods pybindgen is already providing.

Re: [C++-sig] exposing pointer to Python

2009-07-07 Thread Roman Yakovenko
On Tue, Jul 7, 2009 at 5:16 PM, Alexey Akimov wrote: > Thank you, Renato > > However this is still not clear how to wrap a pointer to double using that > indexing_suites. For types like vector it is pretty much clear, but > what do i need to do in order to wrap just a simple poiner to double? The

Re: [C++-sig] pybindgen: allow_subclassing option causing reference parameters to be copied?

2009-07-07 Thread Gustavo Carneiro
2009/7/2 J. Michael Owen > I pulled down your bazaar branch and merged it with my own changes (I need > to use the container methods, inplace numeric operators, and numeric > operators with built in python types, so I have to keep using my changes > for now), and now reference parameters are wor

Re: [C++-sig] Building with Scons

2009-07-07 Thread Nicolas Lara
Of course! Silly mistake... thank you!, that worked perfectly... On Tue, Jul 7, 2009 at 1:43 PM, William Ladwig wrote: > You definitely want the name of the extension .so file to be cylucene.so, so > you will want to drop the 'lib' prefix.  Is your BOOST_PYTHON_MODULE > contained in a file named

Re: [C++-sig] exposing pointer to Python

2009-07-07 Thread Alexey Akimov
Thank you, Renato However this is still not clear how to wrap a pointer to double using that indexing_suites. For types like vector it is pretty much clear, but what do i need to do in order to wrap just a simple poiner to double? Also i have related question - how can i wrap an overloaded indexi

Re: [C++-sig] Passing Python classes derived from C++ back into C++

2009-07-07 Thread Renato Araujo
Hi Paul, You can extend from boost::python::wrapper and use this function to get PyObject from c++ object. namespace detail { .. namespace wrapper_base_ // ADL disabler { inline PyObject* get_owner(wrapper_base const volatile& w); BR On Tue, Jul 7, 2009 at 7:54 AM, Paul Scruby w

Re: [C++-sig] Building with Scons

2009-07-07 Thread William Ladwig
You definitely want the name of the extension .so file to be cylucene.so, so you will want to drop the 'lib' prefix. Is your BOOST_PYTHON_MODULE contained in a file named cylucene.cpp? It looks like you are using a cylucene.cpp file in the final step of your makefile, but it is not in your lis

Re: [C++-sig] Building with Scons

2009-07-07 Thread Nicolas Lara
Thanks for the reply, Yes, I checked the name of the module. It matches the name of the generated file. I also tried changing the name to include "lib" (since scons also generates called libcylucene.so) but it doesnt work. My module looks like this: void init_util(); BOOST_PYTHON_MODULE(cylucene

[C++-sig] Passing Python classes derived from C++ back into C++

2009-07-07 Thread Paul Scruby
Hiya, I'm trying to pass a C++ class that I've extended in Python to a C++ function. I found an example of how to do this in David Abrahams article on Building Hybrid Systems with Boost Python. http://www.boostpro.com/writing/bpl.html#virtual-functions However, I've not managed to get this exa