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

Method tell

Lib/_pyio.py:1783–1788  ·  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

1781 return os.lseek(self._fd, pos, whence)
1782
1783 def tell(self):
1784 """tell() -> int. Current file position.
1785
1786 Can raise OSError for non seekable files."""
1787 self._checkClosed()
1788 return os.lseek(self._fd, 0, SEEK_CUR)
1789
1790 def truncate(self, size=None):
1791 """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