Merge pull request #381 from ferdnyc/swig-python

Add repr to openshot.Version
This commit is contained in:
Jonathan Thomas
2019-12-06 17:14:56 -06:00
committed by GitHub

View File

@@ -153,10 +153,16 @@
}
%extend openshot::OpenShotVersion {
// Give the struct a string representation
// Give the struct a string representation
const std::string __str__() {
return std::string(OPENSHOT_VERSION_FULL);
}
// And a repr for interactive use
const std::string __repr__() {
std::ostringstream result;
result << "OpenShotVersion('" << OPENSHOT_VERSION_FULL << "')";
return result.str();
}
}
%include "OpenShotVersion.h"