[C++-sig] [boost.python] How can I link against certain python version?

2010-01-04 Thread blp330
Hi, I try to upgrade my boost from 1.36 to 1.41, but it will link against python26.lib. My own python version is 2.5, How can I tell boost to link with python25.lib? Thanks. -- View this message in context: http://old.nabble.com/-boost.python--How-can-I-link-against-certain-python-version--t

Re: [C++-sig] Boost Python Tuple - Find length of tuple?

2010-01-04 Thread Simon Pickles
On 04/01/2010 14:02, Brian O'Kennedy wrote: You could try this instead: (untested!) using namespace boost::python; tuple a = make_tuple("hello", 42); std::cout << "Length = " << boost::python::len(a) << std::endl; // explicit namespace not needed Thanks, thats perfect.

Re: [C++-sig] Boost Python Tuple - Find length of tuple?

2010-01-04 Thread Stefan Seefeld
On 01/04/2010 08:53 AM, Simon Pickles wrote: Hello, I have a simple question. How do I find out in c++ how many elements are contained within a boost::python::tuple? I tried this: using namespace boost::python; tuple a = make_tuple("hello", 42); object b = a.attr("length

Re: [C++-sig] Boost Python Tuple - Find length of tuple?

2010-01-04 Thread Brian O'Kennedy
You could try this instead: (untested!) using namespace boost::python; tuple a = make_tuple("hello", 42); std::cout << "Length = " << boost::python::len(a) << std::endl; // explicit namespace not needed hth, Brian 2010/1/4 Simon Pickles > Hello, > > I have a simple question

[C++-sig] Boost Python Tuple - Find length of tuple?

2010-01-04 Thread Simon Pickles
Hello, I have a simple question. How do I find out in c++ how many elements are contained within a boost::python::tuple? I tried this: using namespace boost::python; tuple a = make_tuple("hello", 42); object b = a.attr("length"); // exception unsigned int c = extra