> 3) > bp::list getter (const MyClass& self) > { > bp::list L > //move the values in self.ilist to L > return L > } > void setter (const MyClass& self, bp::list L) > { > //move the values in L to self.ilist > } > > class_<Myclass>("Myclass") > .def_readwrite("i", &Myclass::i) > .def_readwrite("f", &Myclass::f) > .add_property ("ilist", &getter, &setter) > ; > > That's the gist of it. I am not sure if 1 works and 2 will be difficult, so I > recommend 3
Thanks, this works. Incidentally, "getter" seems to be a defined function somewhere else, so I had better luck naming it "listgetter" or something similar. AW _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig