Home | History | Annotate | Download | only in python2.7

Lines Matching refs:lines

1 """Cache lines from files.
3 This is intended to read lines from modules imported -- hence if a filename
14 lines = getlines(filename, module_globals)
15 if 1 <= lineno <= len(lines):
16 return lines[lineno-1]
34 """Get the lines for a file from the cache.
56 size, mtime, lines, fullname = cache[filename]
69 """Update a cache entry and return its list of lines.
128 lines = fp.readlines()
131 if lines and not lines[-1].endswith('\n'):
132 lines[-1] += '\n'
134 cache[filename] = size, mtime, lines, fullname
135 return lines