MCPcopy Create free account
hub / github.com/pexpect/pexpect / sendline

Method sendline

pexpect/popen_spawn.py:149–154  ·  view source on GitHub ↗

Wraps send(), sending string ``s`` to child process, with os.linesep automatically appended. Returns number of bytes written.

(self, s='')

Source from the content-addressed store, hash-verified

147 return len(b)
148
149 def sendline(self, s=''):
150 '''Wraps send(), sending string ``s`` to child process, with os.linesep
151 automatically appended. Returns number of bytes written. '''
152
153 n = self.send(s)
154 return n + self.send(self.linesep)
155
156 def wait(self):
157 '''Wait for the subprocess to finish.

Callers 2

test_expect_basicMethod · 0.95

Calls 1

sendMethod · 0.95

Tested by 2

test_expect_basicMethod · 0.76