[C++-sig] a question about boost python

Chang Chen Chang_Chen at sonic.com
Tue Oct 16 11:23:13 CEST 2007


Hi All

I have a set of functions which last parameters are out-parameter. i.e.

  void  function1(int  t1, float t2, string& t3) ;

I want to expose these functions in python, but such definition
(~def("function1", function1)~) is not what I want.

Because we have to write python code like this:

   strTest=''
   function1(1,2.0,strTest);

I prefer to writing python code like this

   strTest = funciton1(1,2.0)

Is there any idea to solve this question?

Thanks





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20071016/e2bc054e/attachment.htm>


More information about the Cplusplus-sig mailing list