MCPcopy Index your code
hub / github.com/bugy/script-server / write_to_input

Method write_to_input

src/execution/process_pty.py:56–64  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

54 fcntl.fcntl(self.pty_master, fcntl.F_SETFL, os.O_NONBLOCK)
55
56 def write_to_input(self, value):
57 if self.is_finished():
58 return
59
60 input_value = value
61 if not input_value.endswith("\n"):
62 input_value += "\n"
63
64 os.write(self.pty_master, input_value.encode())
65
66 def wait_finish(self):
67 self.process.wait()

Callers

nothing calls this directly

Calls 2

is_finishedMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected