MCPcopy Index your code
hub / github.com/RustPython/RustPython / tell

Method tell

Lib/_pyio.py:1762–1767  ·  view source on GitHub ↗

tell() -> int. Current file position. Can raise OSError for non seekable files.

(self)

Source from the content-addressed store, hash-verified

1760 return os.lseek(self._fd, pos, whence)
1761
1762 def tell(self):
1763 """tell() -> int. Current file position.
1764
1765 Can raise OSError for non seekable files."""
1766 self._checkClosed()
1767 return os.lseek(self._fd, 0, SEEK_CUR)
1768
1769 def truncate(self, size=None):
1770 """Truncate the file to at most size bytes.

Callers 4

truncateMethod · 0.95
seekableMethod · 0.95
testTruncateMethod · 0.95
bug801631Method · 0.95

Calls 1

_checkClosedMethod · 0.45

Tested by 2

testTruncateMethod · 0.76
bug801631Method · 0.76