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

Method writelines

pexpect/pty_spawn.py:518–525  ·  view source on GitHub ↗

This calls write() for each element in the sequence. The sequence can be any iterable object producing strings, typically a list of strings. This does not add line separators. There is no return value.

(self, sequence)

Source from the content-addressed store, hash-verified

516 self.send(s)
517
518 def writelines(self, sequence):
519 '''This calls write() for each element in the sequence. The sequence
520 can be any iterable object producing strings, typically a list of
521 strings. This does not add line separators. There is no return value.
522 '''
523
524 for s in sequence:
525 self.write(s)
526
527 def send(self, s):
528 '''Sends string ``s`` to the child process, returning the number of

Callers 1

test_writelinesMethod · 0.45

Calls 1

writeMethod · 0.95

Tested by 1

test_writelinesMethod · 0.36