(self, filename)
| 1265 | **os.environ}) |
| 1266 | |
| 1267 | def search(self, filename): |
| 1268 | if self._proc.poll() is not None: # Dead, restart it. |
| 1269 | self._proc = self._new_proc() |
| 1270 | self._proc.stdin.write(os.fsencode(filename) + b"\n") |
| 1271 | self._proc.stdin.flush() |
| 1272 | out = self._proc.stdout.readline().rstrip() |
| 1273 | return None if out == b"nil" else os.fsdecode(out) |
| 1274 | |
| 1275 | |
| 1276 | @lru_cache |