offset, whence = 0 Seek to a given byte position. Only supports whence == 0 and offset == the initial value of ReseekFile.tell() (which is usually 0, but not always.)
(self, offset, whence = 0)
| 22 | self._use_buffer = 1 |
| 23 | |
| 24 | def seek(self, offset, whence = 0): |
| 25 | """offset, whence = 0 |
| 26 | |
| 27 | Seek to a given byte position. Only supports whence == 0 |
| 28 | and offset == the initial value of ReseekFile.tell() (which |
| 29 | is usually 0, but not always.) |
| 30 | """ |
| 31 | if whence != 0: |
| 32 | raise TypeError("Unexpected whence value of %s; expecting 0" % \ |
| 33 | (whence,)) |
| 34 | if offset != self.beginning: |
| 35 | raise TypeError("Unexpected offset value of %r; expecting '%s'" % \ |
| 36 | (offset, self.beginning)) |
| 37 | self.buffer_file.seek(0) |
| 38 | self.at_beginning = 1 |
| 39 | |
| 40 | def tell(self): |
| 41 | """the current position of the file |
no outgoing calls
no test coverage detected