def listTrace(self, traceName, eventRange = None):
    """
    List events contained in a trace.
    
    @param traceName:   Trace to examine.
    @param eventRange:  Range of events to list.
    """
    
    if not traceName in self.analyzer.traces:
      self.analyzer.fail("Trace not found: %s" % traceName)
    
    trace = self.analyzer.traces[traceName]
    
    try:    
      exporter = [e for e in self.analyzer.exportPlugins if e.formatName == "text"][0]
    except IndexError:
      self.analyzer.fail("No text format exporter found.")
    
    firstEvent, lastEvent = self.analyzer.parseEventRange(trace, eventRange)

    # Make a shallow copy of the trace that has only the events we're interested in
    trace = copy.copy(trace)
    trace.events = trace.events[firstEvent:lastEvent]
    
    text = StringIO.StringIO()
    exporter.saveTrace(trace, text, truncateValues = True, includeSensorData = False)
    self.reportInfo(text.getvalue())
dataset/ETHPy150Open skyostil/tracy/src/analyzer/plugins/core/CorePlugin.py/CoreInteractivePlugin.listTrace/original