Python: examples: import explicit BT modules
[babeltrace.git] / bindings / python / examples / example-api-test.py
index 5410d2c26a3112331ffe94a3528af20a8740f6e2..1bdea6cc7eec63a80b2b848f2cd858469af25892 100644 (file)
 # to partially test the api.
 
 import sys
-from babeltrace import *
+import babeltrace.reader
+
 
 # Check for path arg:
 if len(sys.argv) < 2:
     raise TypeError("Usage: python example-api-test.py path/to/file")
 
 # Create TraceCollection and add trace:
-traces = TraceCollection()
+traces = babeltrace.reader.TraceCollection()
 trace_handle = traces.add_trace(sys.argv[1], "ctf")
 if trace_handle is None:
     raise IOError("Error adding trace")
This page took 0.039818 seconds and 4 git commands to generate.