GujuBoy: > i am trying to make a "cpp" file which will make an array and pass it > to python as a list. > > how is this possible...i am using BOOST...please can someone point me > at some examples
This returns a list when called from Python. static list retrieval_as_list(SplitText &self, int position, int retrieveLength) { list result; int *characters = new int[retrieveLength]; int lenRet = self.RetrieveUTF32(position, characters, retrieveLength); for (int i=0;i<lenRet;i++) { result.append(characters[i]); } delete []characters; return result; } Neil -- http://mail.python.org/mailman/listinfo/python-list