Project

General

Profile

Feature #1233

Python: Add __str__ to Message types, and perhaps other types

Added by Simon Marchi 10 months ago. Updated 10 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Python bindings
Target version:
Start date:
02/17/2020
Due date:
% Done:

0%

Estimated time:

Description

Example use case: I assume that when implementing a sink, people will print() the messages they receive at first. It would be nice if the output was more useful than:

<bt2.message._EventMessage object @ 0x607000006530>
<bt2.message._PacketEndMessage object @ 0x6070000065a0>
<bt2.message._PacketBeginningMessage object @ 0x607000006760>
<bt2.message._PacketBeginningMessage object @ 0x6070000049a0>
<bt2.message._EventMessage object @ 0x607000004c40>
<bt2.message._EventMessage object @ 0x607000006a00>
<bt2.message._PacketEndMessage object @ 0x607000006a70>
<bt2.message._PacketBeginningMessage object @ 0x607000006c30>
<bt2.message._EventMessage object @ 0x607000006530>
<bt2.message._PacketEndMessage object @ 0x607000004cb0>
<bt2.message._PacketBeginningMessage object @ 0x607000004e70>
#1

Updated by Jonathan Rajotte Julien 10 months ago

  • Target version changed from Babeltrace - stable 2.0 to Babeltrace - 2.1
#2

Updated by Jonathan Rajotte Julien 10 months ago

  • Author changed from 215 to 8

Also available in: Atom PDF