Swig bound objects don't print nicely
natevm opened this issue · 0 comments
natevm commented
The swig bindings for all visus bound objects are missing representations, which mean they all print an unhelpful swig pointer. Adding representations is fairly easy to do though, and would add a lot of value to the current bindings.
Here's an example of how to add a python representation to a swig bound object:
/* Representations */
%extend Entity {
%feature("python:slot", "tp_repr", functype="reprfunc") repr;
std::string repr() { return $self->to_string(); }
}