Re: [C++-sig] Simple , , I think .. type conversion question C++ -> python

2010-01-13 Thread Tim Couper
Troy Thanks .. your hints are most helpful .. I'll be back :-) Tim On 13/01/2010 19:10, troy d. straszheim wrote: Tim Couper wrote: OK. Here's what I've been stuck with all today .. I have a 3rd party C++ program function which returns a boost::variant (and its invers

[C++-sig] Simple , , I think .. type conversion question C++ -> python

2010-01-13 Thread Tim Couper
OK. Here's what I've been stuck with all today .. I have a 3rd party C++ program function which returns a boost::variant (and its inverse) my_variant my_variant_of_string(const std::string& str) This one takes a string & returns a variant, and am trying to wrap this in python, so that there I

Re: [C++-sig] Boost-python wrapping a vector of vectors?

2010-01-07 Thread Tim Couper
lmost_equal(v2[0][0],1.4) def test_A(): v2 = foo.v2_double() v1a = foo.v_double() v2a = foo.v_double() v1a[:] = [1.4, 2.5, 5.6] v2a[:] = [3.4, 2.8, 7.8, 12.5] v2[:] = [v1a,v2a] res = foo.A(1, v2) assert isinstance(res, foo.A) and there we have it .. I'll be back ..

Re: [C++-sig] Boost-python wrapping a vector of vectors?

2010-01-07 Thread Tim Couper
e's something I'm missing. How do I define a type? Should I be using the named constructors/factories described in http://wiki.python.org/moin/boost.python/HowTo? If so how? Thanks again Tim On 06/01/2010 23:16, troy d. straszheim wrote: Tim Couper wrote: I'm trying to bo

[C++-sig] Boost-python wrapping a vector of vectors?

2010-01-06 Thread Tim Couper
et the error "a call to a constructor cannot appear in a constant expression" Can anyone supply any guidance as to how to wrap this? Thanks Tim Dr Tim Couper ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig