(self, s)
| 248 | self.latex.stdin.flush() |
| 249 | |
| 250 | def _expect(self, s): |
| 251 | s = list(s) |
| 252 | chars = [] |
| 253 | while True: |
| 254 | c = self.latex.stdout.read(1) |
| 255 | chars.append(c) |
| 256 | if chars[-len(s):] == s: |
| 257 | break |
| 258 | if not c: |
| 259 | self.latex.kill() |
| 260 | self.latex = None |
| 261 | raise LatexError("LaTeX process halted", "".join(chars)) |
| 262 | return "".join(chars) |
| 263 | |
| 264 | def _expect_prompt(self): |
| 265 | return self._expect("\n*") |
no test coverage detected