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