Change the file position. The new position is specified by offset, relative to the position indicated by whence. Possible values for whence are: 0: start of stream (default): offset must not be negative 1: current stream position 2: end of stream
(self, offset, whence=io.SEEK_SET)
| 251 | return length |
| 252 | |
| 253 | def seek(self, offset, whence=io.SEEK_SET): |
| 254 | """Change the file position. |
| 255 | |
| 256 | The new position is specified by offset, relative to the |
| 257 | position indicated by whence. Possible values for whence are: |
| 258 | |
| 259 | 0: start of stream (default): offset must not be negative |
| 260 | 1: current stream position |
| 261 | 2: end of stream; offset must not be positive |
| 262 | |
| 263 | Returns the new file position. |
| 264 | |
| 265 | Note that seeking is emulated, so depending on the parameters, |
| 266 | this operation may be extremely slow. |
| 267 | """ |
| 268 | self._check_can_seek() |
| 269 | return self._buffer.seek(offset, whence) |
| 270 | |
| 271 | def tell(self): |
| 272 | """Return the current file position.""" |
nothing calls this directly
no test coverage detected