Lines Matching refs:filename
3 This is intended to read lines from modules imported -- hence if a filename
13 def getline(filename, lineno, module_globals=None):
14 lines = getlines(filename, module_globals)
33 def getlines(filename, module_globals=None):
37 if filename in cache:
38 return cache[filename][2]
40 return updatecache(filename, module_globals)
43 def checkcache(filename=None):
47 if filename is None:
50 if filename in cache:
51 filenames = [filename]
55 for filename in filenames:
56 size, mtime, lines, fullname = cache[filename]
62 del cache[filename]
65 del cache[filename]
68 def updatecache(filename, module_globals=None):
73 if filename in cache:
74 del cache[filename]
75 if not filename or (filename.startswith('<') and filename.endswith('>')):
78 fullname = filename
82 basename = filename
100 cache[filename] = (
104 return cache[filename][2]
107 # when handling a relative filename.
108 if os.path.isabs(filename):
134 cache[filename] = size, mtime, lines, fullname