#NEWLINE# def compute( self ) : #NEWLINE# #INDENT# ' compute() -> None\n        Use BatchDisplayCellEvent to display a serie of SVG files\n        \n        ' #NEWLINE# if self . has_input ( 'File' ) : #NEWLINE# #INDENT# fileValue = self . get_input ( 'File' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fileValue = None #NEWLINE# #UNINDENT# if fileValue : #NEWLINE# #INDENT# batchDisplayEvent = BatchDisplayCellEvent ( ) #NEWLINE# batchDisplayEvent . vistrail = ( self . vistrailName , self . currentVersion ) #NEWLINE# f = open ( fileValue . name , 'r' ) #NEWLINE# for line in f . read ( ) . split ( '\n' ) : #NEWLINE# #INDENT# comps = line . split ( '|' ) #NEWLINE# if ( len ( comps ) == 2 ) : #NEWLINE# #INDENT# e = DisplayCellEvent ( ) #NEWLINE# e . sheetReference = StandardSingleCellSheetReference ( ) #NEWLINE# e . sheetReference . sheetName = comps [ 1 ] #NEWLINE# e . cellType = SVGCellWidget #NEWLINE# from os.path import abspath , basename , dirname , join #NEWLINE# F = PathObject ( join ( dirname ( abspath ( fileValue . name ) ) , basename ( f [ 0 ] ) ) ) #NEWLINE# e . inputPorts = ( F , ) #NEWLINE# batchDisplayEvent . displayEvents . append ( e ) #NEWLINE# #UNINDENT# #UNINDENT# f . close ( ) #NEWLINE# spreadsheetController . postEventToSpreadsheet ( batchDisplayEvent )