Project

General

Profile

Actions

Feature #1233

open

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

Added by Simon Marchi almost 5 years ago. Updated almost 5 years 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>
Actions

Also available in: Atom PDF