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

Method flushInput

src/ext/makerbot_pyserial/rfc2217.py:585–591  ·  view source on GitHub ↗

Clear input buffer, discarding all that is in the buffer.

(self)

Source from the content-addressed store, hash-verified

583 return len(data)
584
585 def flushInput(self):
586 """Clear input buffer, discarding all that is in the buffer."""
587 if not self._isOpen: raise portNotOpenError
588 self.rfc2217SendPurge(PURGE_RECEIVE_BUFFER)
589 # empty read buffer
590 while self._read_buffer.qsize():
591 self._read_buffer.get(False)
592
593 def flushOutput(self):
594 """Clear output buffer, aborting the current output and

Callers 2

openMethod · 0.95

Calls 2

rfc2217SendPurgeMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected