Name
seek
Synopsis
m
.seek(pos
,how
=0)
Sets
the file pointer of m
to the integer byte
offset pos
. how
indicates the reference point (point 0
): when
how
is 0
, the reference
point is the start of the file; when 1
,
m
’s current file pointer;
when 2
, the end of m
. A
seek
that tries to set
m
’s file pointer to a
negative byte offset, or to a positive offset beyond
m
’s length, raises a
ValueError
exception.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.