Move Python bindings to babeltrace subfolder This change reflects the arborescence used to install Babeltrace's python bindings and allows Babeltrace's tests to use the normal module name namespace. Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python: examples: import explicit BT modules The best practice in Python is generally to import explicit modules rather than importing all its exposed members. This also makes the examples hide the fact that reader/writer members are exposed directly by the package, whereas this is only a backward compatibility layer now. Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python-bindings: Refactor the FieldDecl and EventDecl classes Renamed the FieldDecl and EventDecl classes to FieldDeclaration and EventDeclaration. Getters are now exposed as properties. Fixed an out of bounds array access. Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python-bindings: Refactor the Event class The Event class now implements the collections.Mapping interface and provides properties where appropriate. The Definition class is now private and renamed to _Definition. The examples are modified to take these changes into account. Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Python-bindings: Refactor the Context class The context class is now called TraceCollection and provides generator functions to iterate over the traces' events. This makes it possible to get rid of the Iterator, IterPos and File classes. The examples are adapted to match the changes. Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Add a python bindings sequence test This example is meant to test whether we can get a sequence's values in the python binding well or not. It is used in conjunction with the sequence test in the dir tests/ctf-traces/succeed/sequence. Signed-off-by: Xiaona Han <xiaonahappy13@163.com> Acked-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>