The following lines show the class string representation before and
after this patch:
<sigrok.core.classes.Channel; proxy of <Swig Object of type 'std::shared_ptr< sigrok::Channel > *' at 0x7fdf4b29ff00> >
Channel (type=ChannelType.LOGIC, name='D0', index=0, enabled=True)
Signed-off-by: Marc Schink <redacted>
Context.create_logic_packet = _Context_create_logic_packet
}
+%extend sigrok::Channel
+{
+%pythoncode
+{
+ def __repr__(self):
+ return _class_attribute_repr(self, ['type', 'name', 'index', 'enabled'])
+}
+}
+
%include "doc_end.i"