Lines Matching refs:filename
15 def getline(filename, lineno, module_globals=None): argument
16 lines = getlines(filename, module_globals)
37 def getlines(filename, module_globals=None): argument
41 if filename in cache:
42 entry = cache[filename]
44 return cache[filename][2]
47 return updatecache(filename, module_globals)
53 def checkcache(filename=None): argument
57 if filename is None:
60 if filename in cache:
61 filenames = [filename]
65 for filename in filenames:
66 entry = cache[filename]
76 del cache[filename]
79 del cache[filename]
82 def updatecache(filename, module_globals=None): argument
87 if filename in cache:
88 if len(cache[filename]) != 1:
89 del cache[filename]
90 if not filename or (filename.startswith('<') and filename.endswith('>')):
93 fullname = filename
97 basename = filename
101 if lazycache(filename, module_globals):
103 data = cache[filename][0]()
111 cache[filename] = (
115 return cache[filename][2]
119 if os.path.isabs(filename):
143 cache[filename] = size, mtime, lines, fullname
147 def lazycache(filename, module_globals): argument
160 if filename in cache:
161 if len(cache[filename]) == 1:
165 if not filename or (filename.startswith('<') and filename.endswith('>')):
175 cache[filename] = (get_lines,)