MCPcopy Index your code
hub / github.com/RustPython/RustPython / __read

Method __read

Lib/_pyrepl/unix_console.py:208–217  ·  view source on GitHub ↗
(self, n: int)

Source from the content-addressed store, hash-verified

206 )
207
208 def __read(self, n: int) -> bytes:
209 if not self.more_in_buffer():
210 self.input_buffer = os.read(self.input_fd, 10000)
211
212 ret = self.input_buffer[self.input_buffer_pos : self.input_buffer_pos + n]
213 self.input_buffer_pos += len(ret)
214 if self.input_buffer_pos >= len(self.input_buffer):
215 self.input_buffer = b""
216 self.input_buffer_pos = 0
217 return ret
218
219
220 def change_encoding(self, encoding: str) -> None:

Callers 2

get_eventMethod · 0.95
getpendingMethod · 0.95

Calls 3

more_in_bufferMethod · 0.95
lenFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected