Move to new file position. Argument offset is a byte count. Optional argument whence defaults to SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values are SEEK_CUR or 1 (move relative to current position, positive or negative), and SEEK_END
(self, pos, whence=SEEK_SET)
| 1744 | return None |
| 1745 | |
| 1746 | def seek(self, pos, whence=SEEK_SET): |
| 1747 | """Move to new file position. |
| 1748 | |
| 1749 | Argument offset is a byte count. Optional argument whence defaults to |
| 1750 | SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values |
| 1751 | are SEEK_CUR or 1 (move relative to current position, positive or negative), |
| 1752 | and SEEK_END or 2 (move relative to end of file, usually negative, although |
| 1753 | many platforms allow seeking beyond the end of a file). |
| 1754 | |
| 1755 | Note that not all file objects are seekable. |
| 1756 | """ |
| 1757 | if isinstance(pos, float): |
| 1758 | raise TypeError('an integer is required') |
| 1759 | self._checkClosed() |
| 1760 | return os.lseek(self._fd, pos, whence) |
| 1761 | |
| 1762 | def tell(self): |
| 1763 | """tell() -> int. Current file position. |