Return a string for the file, row and column of the term.
491884
def file_ref(self):
        """"""
        from metatab.util import slugify

        assert self.file_name is None or isinstance(self.file_name, str)

        if self.file_name is not None and self.row is not None:
            parts = split(self.file_name);
            return "{} {}:{} ".format(parts[-1], self.row, self.col)
        elif self.row is not None:
            return " {}:{} ".format(self.row, self.col)
        else:
            return ''
396846
def _get_row(self, id):
        """"""
        return {name: d['func'](id) for (name, d) in self._columns.items()}
469363
def row(self, data):
        """"""
        for column in self.column_funcs:
            if callable(column):
                yield column(data)
            else:
                yield utils.lookup(data, *column)
476399
def get_text(self):
        '''
            
        '''
        self.compute_column_width_and_height()
        return '\n'.join((row.get_text() for row in self.rows))
694814
def head_item(self):
        """"""
        delimiter = self.style.attr_minor(self.style.delimiter)
        hint = self.style.header_hint * self.wide
        heading = (u'{delimiter}{hint}{delimiter}'
                   .format(delimiter=delimiter, hint=hint))
        alignment = lambda *args: (
            self.term.rjust(*args) if self.style.alignment == 'right' else
            self.term.ljust(*args))
        txt = alignment(heading, self.hint_width, self.style.header_fill)
        return self.style.attr_major(txt)
313836
def _file_details(filename):
    
    max_head, max_foot = _max_lengths()
    with open(filename, "rb") as fin:
        head = fin.read(max_head)
        try:
            fin.seek(-max_foot, os.SEEK_END)
        except IOError:
            fin.seek(0)
        foot = fin.read()
    return head, foot
373025
def search(self, terms):
        
        # load the search information
        if not self._searchurls:
            base = self.tempFilepath()
            root_url = projex.text.underscore(self.text(0))
            for root, folders, files in os.walk(base):
                if '_static' in root:
                    continue
                
                for file in files:
                    if not file.endswith('.html'):
                        continue
                    
                    filename = os.path.join(root, file)
                    url = filename[len(base)+1:].replace('\\', '/')
                    url = root_url + '/' + url.strip('/')
                    url = url.replace('.html', '')
                    
                    f = open(filename, 'r')
                    content = f.read()
                    f.close()
                    
                    self._searchurls[url] = content

        # search for the contents
        output = [] # [(<int> strength>
        term_list = nativestring(terms).split(' ')
        for url, html in self._searchurls.items():
            title           = self.titleForFilepath(url)
            strength        = 0
            all_title_found = True
            all_found       = True
            
            for term in term_list:
                if ( term == title ):
                    strength += 5
                
                elif ( term.lower() == title.lower() ):
                    strength += 4
                    
                elif ( term in title ):
                    strength += 3
                
                elif ( term.lower() in title.lower() ):
                    strength += 2
                
                else:
                    all_title_found = False
                
                if ( not term in html ):
                    all_found = False
                else:
                    strength += 1
            
            if ( all_title_found ):
                strength += len(terms) * 2
            
            if ( all_found ):
                strength += len(terms)
            
            # determine the strength
            if ( strength ):
                output.append({'url': url, 
                               'title': self.titleForFilepath(url),
                               'strength': strength})
        
        return output
117033
def output_file_name(self):
    """"""

    safe_path = re.sub(r":|/", "_", self.source_urn.Path().lstrip("/"))
    return "results_%s%s" % (safe_path, self.output_file_extension)
815204
def arrays_to_string(file_prefix=None):
    """"""
    return Registry(
        types={
            numpy.ndarray: SerNumpyArray(),
            numpy.floating: SerNumpyScalar()
        },
        hooks={
            '<ufunc>': SerUFunc()
        },
        hook_fn=_numpy_hook
    )
502137
def format_filename(self, data, row):
        
        return self.filename.format(**self.filename_formatters(data, row))
129554
def get_row_sep(self):
        """"""
        if self.eol_btn.isChecked():
            return u"\n"
        return to_text_string(self.line_edt_row.text())
982839
def GetValue(self, row, col):
        
        if len(self.dataframe):
            return str(self.dataframe.iloc[row, col])
        return ''
1034647
def GetFilename(self):
    
    if not self._file_entry:
      return None

    data_stream = getattr(self._file_entry.path_spec, 'data_stream', None)
    if data_stream:
      return '{0:s}:{1:s}'.format(self._file_entry.name, data_stream)

    return self._file_entry.name
455975
public function getCellValue(int $col, int $row): string
    {
        if (!isset($this->structure[$row][$col])) {
            return '';
        }

        return $this->structure[$row][$col]['value'];
    }
763273
def filesfile_string(self):
        """"""
        lines = []
        app = lines.append

        app(self.input_file.path)          # 1) Path of the input file
        app(self.output_file.path)         # 2) Path of the output file
        app(self.ddb_filepath)             # 3) Input derivative database e.g. t13.ddb.in
        app(self.md_filepath)              # 4) Output molecular dynamics e.g. t13.md
        app(self.gkk_filepath)             # 5) Input elphon matrix elements  (GKK file)
        app(self.outdir.path_join("out"))  # 6) Base name for elphon output files e.g. t13
        app(self.ddk_filepath)             # 7) File containing ddk filenames for elphon/transport.

        return "\n".join(lines)
60348
def getFileDescription(self, fileInfo):
		""""""
		data = 'Description'
		result = fileInfo[fileInfo.find(data + "</td>") + len(data + "</td>"):]
		result.lstrip()
		result = result[:result.find("</td>")]
		result = result[result.rfind("<"):]
		if "<td" in result:
			result = result[result.find(">") + 1:]
		return result
974965
def _get_file_index_str(self):
        """"""
        file_index = str(self.file_index)
        if self.n_digits is not None:
            file_index = file_index.zfill(self.n_digits)
        return file_index