MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / readbytes

Method readbytes

cmd2/utils.py:456–460  ·  view source on GitHub ↗

Read from the internal contents as bytes and then clear them out.

(self)

Source from the content-addressed store, hash-verified

454 return result
455
456 def readbytes(self) -> bytes:
457 """Read from the internal contents as bytes and then clear them out."""
458 result = self.getbytes()
459 self.clear()
460 return result
461
462 def clear(self) -> None:
463 """Clear the internal contents."""

Callers 2

test_stdsim_read_bytesFunction · 0.80

Calls 2

getbytesMethod · 0.95
clearMethod · 0.95

Tested by 2

test_stdsim_read_bytesFunction · 0.64