You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Add __repr__ to openshot.Version
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user