MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _expect

Method _expect

lib/matplotlib/backends/backend_pgf.py:250–262  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

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*")

Callers 2

_expect_promptMethod · 0.95
_setup_latex_processMethod · 0.95

Calls 2

LatexErrorClass · 0.85
joinMethod · 0.80

Tested by

no test coverage detected