summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-01-24 14:10:20 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-01-24 14:10:20 +0200
commit8e93fa0bb51744cb3c33ce7308c204caa68e40f8 (patch)
tree4572e8f3f0d814fd64c59e69a7d7634417e660a8
parenta05c9146d46a25f95856b43c5d87620bbf19da1d (diff)
pykms: add Videomode.__repr__
-rw-r--r--py/pykms/pykmsbase.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/pykms/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
index 5247158..13c4dd1 100644
--- a/py/pykms/pykmsbase.cpp
+++ b/py/pykms/pykmsbase.cpp
@@ -144,6 +144,8 @@ void init_pykmsbase(py::module &m)
.def_readwrite("flags", &Videomode::flags)
.def_readwrite("type", &Videomode::type)
+
+ .def("__repr__", [](const Videomode& vm) { return "<pykms.Videomode " + to_string(vm.hdisplay) + "x" + to_string(vm.vdisplay) + ">"; })
;
py::class_<AtomicReq>(m, "AtomicReq")