MCPcopy Index your code
hub / github.com/bpython/bpython / next

Method next

bpython/test/test_crashers.py:67–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 self.delayed_call = reactor.callLater(0.5, self.next)
66
67 def next(self):
68 self.delayed_call = None
69 if self.state == self.SEND_INPUT:
70 index = self.data.find(">>> ")
71 if index >= 0:
72 self.data = self.data[index + 4 :]
73 self.transport.write(input.encode(encoding))
74 self.state = next(self.states)
75 elif self.data == "\x1b[6n":
76 # this is a cursor position query
77 # respond that cursor is on row 2, column 1
78 self.transport.write("\x1b[2;1R".encode(encoding))
79 else:
80 self.transport.closeStdin()
81 if self.transport.pid is not None:
82 self.delayed_call = None
83 self.transport.signalProcess("TERM")
84
85 def processExited(self, reason):
86 if self.delayed_call is not None:

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected