Set the position of the data buffer cursor to 'position'.
(self, position=0)
| 92 | self._position = new_position |
| 93 | |
| 94 | def rewind(self, position=0): |
| 95 | """Set the position of the data buffer cursor to 'position'.""" |
| 96 | if position < 0 or position > len(self._data): |
| 97 | raise Exception("Invalid position to rewind cursor to: %s." % position) |
| 98 | self._position = position |
| 99 | |
| 100 | def get_bytes(self, position, length=1): |
| 101 | """Get 'length' bytes starting at 'position'. |