예제 #1
0
 def addMergedAliases( self, aliases, pipeline ):
     if self.serializedConfigAlias:
         if self.serializedConfigAlias in pipeline.aliases and not self.serializedConfigAlias in aliases:
             try:
                 file = [ getHomeRelativePath( aliases[       self.files[i]        ] ) for i in range(self.filenum) ]
                 url =  [ getHomeRelativePath( aliases[  "%s.url" % self.files[i]  ] ) for i in range(self.filenum) ]
                 fileAliases = '|'.join( [ "%s!%s!%s" % ( self.files[i], file[i], url[i] )  for i in range(self.filenum) ] )
                 varAliases  = '|'.join( [ "%s!%s!%s" % ( self.vars[i], aliases[self.vars[i]], aliases[ "%s.file" % self.vars[i]] )  for i in range(self.varnum) ] )
                 gridAliases = '|'.join( [ "%s!%s" % ( self.axes[i], aliases[self.axes[i]] )  for i in range(self.varnum) ] )
                 cellAliases = '' # '|'.join( cell_specs) if cell_specs else '|'.join( [ "location%d!%s" % ( i, self.cells[i].getAddress( aliases ) ) for i in range( len(self.cells) ) ] )                    
                 aliases[ self.serializedConfigAlias ] = ';'.join( [ fileAliases, varAliases, gridAliases, cellAliases ] )
                 print " vcdatInputSpecs: ", str( aliases[ self.serializedConfigAlias ] )
             except KeyError, err:
                 # it failed because the other aliases do not exist
                 # it's very likely that the serialized alias is already set.
                 print>>sys.stderr, "---------------------------------------------------------------------------------"
                 print>>sys.stderr, " WARNING: Could not build serialized alias from other aliases. Using current one."
                 print>>sys.stderr, "---------------------------------------------------------------------------------"
예제 #2
0
 def relativizePaths(self):
     self.file = getHomeRelativePath(self.file)
     self.url = getHomeRelativePath(self.url)
예제 #3
0
파일: init.py 프로젝트: imclab/vistrails
 def relativizePaths(self):
     self.file = getHomeRelativePath( self.file ) 
     self.url = getHomeRelativePath( self.url )