> I get this error: > *TypeError: No to_python (by-value) converter found for C++ type: class > std::basic_ostream<char,struct std::char_traits<char> >* > > This is the python function > * def serialise(self, gameobj, file): > if(gameobj in self.components): > file.write("HEY", 3)* > > What's the problem here? Is is because the ostream argument is an reference? The problem is you are trying to copy a noncopyable object:
return class_<std::ostream, bases<std::ios>, boost::noncopyable>("ostream", no_init)
ostream is noncopyable
.def("write", write , return_value_policy<copy_non_const_reference>())
but you define write to return copy (of ostream) _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig