PyDocs

Nav

Generic Operating System Services

lseek

os

function
  • lseek(fd, pos, whence, /)
Set the position of a file descriptor.  Return the new position.

  fd
    An open file descriptor, as returned by os.open().
  position
    Position, interpreted relative to 'whence'.
  whence
    The relative position to seek from. Valid values are:
    - SEEK_SET: seek from the start of the file.
    - SEEK_CUR: seek from the current file position.
    - SEEK_END: seek from the end of the file.

The return value is the number of bytes relative to the beginning of
the file.
Changed in 3.3
  • 3.3: Add support for SEEK_HOLE and SEEK_DATA.
0 Examples
No examples for os/lseek.
See Also
No see-alsos for os/lseek
0 Notes
No notes for lseek