MCPcopy Index your code
hub / github.com/python/cpython / do

Method do

Lib/_pyrepl/commands.py:492–505  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

490
491class perform_bracketed_paste(Command):
492 def do(self) -> None:
493 done = "\x1b[201~"
494 data = ""
495 start = time.time()
496 while done not in data:
497 ev = self.reader.console.getpending()
498 data += ev.data
499 trace(
500 "bracketed pasting of {l} chars done in {s:.2f}s",
501 l=len(data),
502 s=time.time() - start,
503 )
504 self.reader.insert(data.replace(done, ""))
505 self.reader.last_refresh_cache.invalidated = True

Callers

nothing calls this directly

Calls 5

traceFunction · 0.90
timeMethod · 0.45
getpendingMethod · 0.45
insertMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected