Re: [C++-sig] pybind11 -- alternative to Boost.Python

2015-10-19 Thread Francesco Biscani
This looks really neat! Do you have any measure on the memory/cpu performance wrt Boost.Python when compiling large bindings? I would expect that variadic templates and all the other C++11 goodies are more efficient than the preprocessor magic used in Boost Python, from this point of view. Cheers

Re: [C++-sig] Magic boost conversion unicorn hook?

2015-09-26 Thread Francesco Biscani
On 25 September 2015 at 17:20, Stefan Seefeld wrote: > I don't entirely understand what you are saying. What do you mean by > "boost.python object", and what by "boost.python library function" ? > I think he has a C++ class that was exposed to Python, and which is included as a member of a pure

Re: [C++-sig] Boost.Python docs update

2015-08-06 Thread Francesco Biscani
Kudos and thanks a lot, that looks great! (and it must have taken a lot of effort...) Cheers, Francesco. On 5 August 2015 at 14:23, Stefan Seefeld wrote: > Hi all, > > I have updated the Boost.Python documentation. > > The new docs are available at http://boostorg.github.io/python. > (For an

Re: [C++-sig] Handling Python exceptions from an exposed C++ function

2014-11-16 Thread Francesco Biscani
Hello Jim, On 16 November 2014 20:23, Jim Bosch wrote: > On Sun, Nov 16, 2014 at 1:51 PM, Francesco Biscani > wrote: > >> >> This can result in an exception being thrown from Python (e.g., >> comparison of a numpy array with zero). What happens in this case is that

[C++-sig] Handling Python exceptions from an exposed C++ function

2014-11-16 Thread Francesco Biscani
Hello all, I don't know if the subject makes any sense, but hopefully the description of the problem will make things clearer :) I have a template class which I am exposing to Python with different types instantiated. For the sake of simplicity, let's say it is a Vector class. I have various vers

Re: [C++-sig] Exposing a generic template system in Boost.Python

2014-03-20 Thread Francesco Biscani
Hello Stefan and Nikolay, thanks for the replies. I have been using as well approaches similar to those you outlined. My main concern is the automation of the whole procedure. I have a fairly complicated hierarchy of template classes that I am exposing, and I need to be able to add new exposed ins

[C++-sig] Exposing a generic template system in Boost.Python

2014-03-19 Thread Francesco Biscani
Greetings, I have been trying to think of a solution about this for a few days now, but I did not get very far. I am exposing specific instances of C++ template classes using Boost.Python. Let's say for the sake of argument that I am exposing std::vector. What I would like to achieve on the Pytho