MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / write

Method write

src/ext/makerbot_pyserial/serialjava.py:168–174  ·  view source on GitHub ↗

Output the given string over the serial port.

(self, data)

Source from the content-addressed store, hash-verified

166 return bytes(read)
167
168 def write(self, data):
169 """Output the given string over the serial port."""
170 if not self.sPort: raise portNotOpenError
171 if not isinstance(data, (bytes, bytearray)):
172 raise TypeError('expected %s or bytearray, got %s' % (bytes, type(data)))
173 self._outstream.write(data)
174 return len(data)
175
176 def flushInput(self):
177 """Clear input buffer, discarding all that is in the buffer."""

Callers 1

serialjava.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected