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

Method _coerce_send_string

pexpect/spawnbase.py:154–157  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

152 return r
153
154 def _coerce_send_string(self, s):
155 if self.encoding is None and not isinstance(s, bytes):
156 return s.encode('utf-8')
157 return s
158
159 def _get_buffer(self):
160 return self._buffer.getvalue()

Callers 7

sendMethod · 0.80
sendMethod · 0.80
sendlineMethod · 0.80
sendMethod · 0.80
sendlineMethod · 0.80
sendMethod · 0.80
sendlineMethod · 0.80

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected