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

Method write_to_stdout

pexpect/spawnbase.py:94–99  ·  view source on GitHub ↗
(b)

Source from the content-addressed store, hash-verified

92 self.allowed_string_types = (bytes, str)
93 self.linesep = os.linesep.encode('ascii')
94 def write_to_stdout(b):
95 try:
96 return sys.stdout.buffer.write(b)
97 except AttributeError:
98 # If stdout has been replaced, it may not have .buffer
99 return sys.stdout.write(b.decode('ascii', 'replace'))
100 self.write_to_stdout = write_to_stdout
101 else:
102 self.allowed_string_types = (basestring,) # analysis:ignore

Callers 1

interactMethod · 0.80

Calls 2

decodeMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected