MCPcopy Create free account
hub / github.com/agent0ai/agent-zero / _Stdin

Class _Stdin

plugins/_code_execution/helpers/tty_session.py:289–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287 loop.add_reader(master, _on_data)
288
289 class _Stdin:
290 def write(self, d):
291 cur = master_ref.get("fd")
292 if cur is None:
293 raise OSError(errno.EBADF, "PTY master closed")
294 os.write(cur, d)
295
296 async def drain(self):
297 await asyncio.sleep(0)
298
299 proc.stdin = _Stdin() # type: ignore
300 proc.stdout = reader

Callers 2

_spawn_posix_ptyFunction · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected