Jim, actually, this IS impossible, for a limit of Boost.Python. The explanation is into the FAQs of the Boost.Python documentation.
Basically it is not possible to develop an l-value converter, so it's not possible to solve this problem. The author of Boost.Python explains that for solving this problem a complete review of the library is needed (and I hope he will do it so that in the future that feature will be available). Bye, Michele 2010/5/25 Jim Bosch <tallji...@gmail.com>: > Hope I'm not thread-hijacking too much here, but this piqued my curiosity: > > On 05/25/2010 12:06 AM, Michele De Stefano wrote: >> >> Nathan, >> >> if you want to take a boost::numeric::ublas::vector instead of >> std::vector, you can use my library (mds-utils, the link is at the end >> of this e-mail), which already provides the proper converters. >> >> > > Do you handle the non-const reference case automatically? More precisely, > can you do: > > void func(boost::numeric::ublas::vector & arg); > boost::python::def("func", func); > > ...pass it a python list, and find that list modified after the call? > > I've been stumped by this problem in boost python before, and I had > previously come the conclusion that it was impossible, so I'd be very > interested to hear it if you have a solution. > > > Jim Bosch > -- Michele De Stefano http://www.linkedin.com/in/micdestefano http://code.google.com/p/mds-utils http://xoomer.virgilio.it/michele_de_stefano _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig