Tests: Multi-trace stream intersection test
[babeltrace.git] / bindings / python / examples / example-api-test.py
index c1c6f42eac7ee1bd700de449ffbfdaf7c1663107..1bdea6cc7eec63a80b2b848f2cd858469af25892 100644 (file)
 #
 # The above copyright notice and this permission notice shall be included in
 # all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
 
 # This example uses the babeltrace python module
 # 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.027641 seconds and 4 git commands to generate.