Change stream position. Change the stream position to byte offset pos. Argument pos is interpreted relative to the position indicated by whence. Values for whence are ints: * 0 -- start of stream (the default); offset should be zero or positive * 1 -- curre
(self, pos, whence=0)
| 345 | ### Positioning ### |
| 346 | |
| 347 | def seek(self, pos, whence=0): |
| 348 | """Change stream position. |
| 349 | |
| 350 | Change the stream position to byte offset pos. Argument pos is |
| 351 | interpreted relative to the position indicated by whence. Values |
| 352 | for whence are ints: |
| 353 | |
| 354 | * 0 -- start of stream (the default); offset should be zero or positive |
| 355 | * 1 -- current stream position; offset may be negative |
| 356 | * 2 -- end of stream; offset is usually negative |
| 357 | Some operating systems / file systems could provide additional values. |
| 358 | |
| 359 | Return an int indicating the new absolute position. |
| 360 | """ |
| 361 | self._unsupported("seek") |
| 362 | |
| 363 | def tell(self): |
| 364 | """Return an int indicating the current stream position.""" |