#NEWLINE# def play( self , trace , traceFileName = None , profile = False , saveFrames = False , checkCoherence = True , synchronize = False ) : #NEWLINE# #INDENT# if ( not os . path . isfile ( self . binary ) ) : #NEWLINE# #INDENT# self . analyzer . fail ( ( 'Player not found: %s' % self . binary ) ) #NEWLINE# #UNINDENT# ( traceFileName , removeTraceFile ) = self . _makeTracePlayable ( trace , traceFileName , checkCoherence ) #NEWLINE# try : #NEWLINE# #INDENT# args = [ self . binary , traceFileName ] #NEWLINE# if saveFrames : #NEWLINE# #INDENT# args += [ '--save-frames' ] #NEWLINE# #UNINDENT# if ( profile or saveFrames ) : #NEWLINE# #INDENT# args += [ '--profile' ] #NEWLINE# #UNINDENT# if synchronize : #NEWLINE# #INDENT# args += [ '--synchronize' ] #NEWLINE# #UNINDENT# subprocess . call ( args ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# if removeTraceFile : #NEWLINE# #INDENT# os . unlink ( traceFileName ) #NEWLINE# #UNINDENT# #UNINDENT# instLog = Instrumentation . instrumentationLogFileName ( traceFileName ) #NEWLINE# if os . path . exists ( instLog ) : #NEWLINE# #INDENT# return instLog