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

Method _read_stream

Lib/asyncio/subprocess.py:171–186  ·  view source on GitHub ↗
(self, fd)

Source from the content-addressed store, hash-verified

169 return None
170
171 async def _read_stream(self, fd):
172 transport = self._transport.get_pipe_transport(fd)
173 if fd == 2:
174 stream = self.stderr
175 else:
176 assert fd == 1
177 stream = self.stdout
178 if self._loop.get_debug():
179 name = 'stdout' if fd == 1 else 'stderr'
180 logger.debug('%r communicate: read %s', self, name)
181 output = await stream.read()
182 if self._loop.get_debug():
183 name = 'stdout' if fd == 1 else 'stderr'
184 logger.debug('%r communicate: close %s', self, name)
185 transport.close()
186 return output
187
188 async def communicate(self, input=None):
189 if self.stdin is not None:

Callers 1

communicateMethod · 0.95

Calls 5

get_pipe_transportMethod · 0.45
get_debugMethod · 0.45
debugMethod · 0.45
readMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected