diff --git a/src/bindings/python/openshot.i b/src/bindings/python/openshot.i index a2228d75..44b1953e 100644 --- a/src/bindings/python/openshot.i +++ b/src/bindings/python/openshot.i @@ -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"