Move the current seek pointer to the given block. You can use negative indices to seek from the end, with identical semantics to those of Python lists.
(self,index)
| 359 | return index |
| 360 | |
| 361 | def seek(self,index): |
| 362 | """Move the current seek pointer to the given block. |
| 363 | |
| 364 | You can use negative indices to seek from the end, with identical |
| 365 | semantics to those of Python lists.""" |
| 366 | if index<0: |
| 367 | index = self.nblocks + index |
| 368 | self._validate_index(index) |
| 369 | self.block_index = index |
| 370 | self.finished = False |
| 371 | |
| 372 | def back(self,num=1): |
| 373 | """Move the seek pointer back num blocks (default is 1).""" |