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