MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / seek

Method seek

tools/python-3.11.9-amd64/Lib/_pyio.py:372–386  ·  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 -

(self, pos, whence=0)

Source from the content-addressed store, hash-verified

370 ### Positioning ###
371
372 def seek(self, pos, whence=0):
373 """Change stream position.
374
375 Change the stream position to byte offset pos. Argument pos is
376 interpreted relative to the position indicated by whence. Values
377 for whence are ints:
378
379 * 0 -- start of stream (the default); offset should be zero or positive
380 * 1 -- current stream position; offset may be negative
381 * 2 -- end of stream; offset is usually negative
382 Some operating systems / file systems could provide additional values.
383
384 Return an int indicating the new absolute position.
385 """
386 self._unsupported("seek")
387
388 def tell(self):
389 """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