MCPcopy Index your code
hub / github.com/python/cpython / seek

Method seek

Lib/_pyio.py:347–361  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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."""

Callers 8

tellMethod · 0.95
seekMethod · 0.45
seekMethod · 0.45
seekMethod · 0.45
seekMethod · 0.45
writeMethod · 0.45
seekMethod · 0.45
__init__Method · 0.45

Calls 1

_unsupportedMethod · 0.95

Tested by

no test coverage detected