parameters: (self, node_name)
return_statement: return cache_info
docstring: return all of the (node, path) concerning geo files as list
docstring_summary: return all of the (node, path) concerning geo files as list
docstring_tokens: return all of the ( node path ) concerning geo files as list
function: def get_geo_from_session(self, node_name):
          '''return all of the (node, path) concerning geo files as list'''
          cache_info = []
          paths = []
          geo_nodes = self.app.mel("ls -type cacheFile")
          if not geo_nodes:
              return []
          
          node_shapes = []
          if self.app.node_exists(node_name):
              node_shapes = self.app.get_children(node_name, full_path=False, type='shape', recurse=True)
          #node_shapes = self.app.mel('listRelatives -type shape "%s"'%node_name)
          if node_shapes:
              node_shapes = list(node_shapes)
          else:
              node_shapes = []
          for geo_node in geo_nodes:
              cache_shape = ''
              cache_shapes = self.app.mel('cacheFile -q -cnm "%s"' % geo_node)
              # skip if not related to this node_name
              # we only support single cache shape for now
              if cache_shapes:
                  cache_shape = cache_shapes[0] 
              if cache_shape not in node_shapes:
                  continue
              geo_paths = self.app.mel('cacheFile -q -f "%s"' % geo_node)
              for geo_path in geo_paths:
                  if geo_path not in paths:
                      cache_info.append((geo_node, geo_path))
                      paths.append(geo_path)
                      
          cache_info = sorted(cache_info)
          return cache_info
function_tokens: def get_geo_from_session ( self , node_name ) : cache_info = [ ] paths = [ ] geo_nodes = self . app . mel ( "ls -type cacheFile" ) if not geo_nodes : return [ ] node_shapes = [ ] if self . app . node_exists ( node_name ) : node_shapes = self . app . get_children ( node_name , full_path = False , type = 'shape' , recurse = True ) #node_shapes = self.app.mel('listRelatives -type shape "%s"'%node_name) if node_shapes : node_shapes = list ( node_shapes ) else : node_shapes = [ ] for geo_node in geo_nodes : cache_shape = '' cache_shapes = self . app . mel ( 'cacheFile -q -cnm "%s"' % geo_node ) # skip if not related to this node_name # we only support single cache shape for now if cache_shapes : cache_shape = cache_shapes [ 0 ] if cache_shape not in node_shapes : continue geo_paths = self . app . mel ( 'cacheFile -q -f "%s"' % geo_node ) for geo_path in geo_paths : if geo_path not in paths : cache_info . append ( ( geo_node , geo_path ) ) paths . append ( geo_path ) cache_info = sorted ( cache_info ) return cache_info