MCPcopy Create free account
hub / github.com/ActiveState/code / tell

Method tell

recipes/Python/173071_ReseekFile/recipe-173071.py:40–48  ·  view source on GitHub ↗

the current position of the file The initial position may not be 0 if the underlying input file supports tell and it not at position 0.

(self)

Source from the content-addressed store, hash-verified

38 self.at_beginning = 1
39
40 def tell(self):
41 """the current position of the file
42
43 The initial position may not be 0 if the underlying input
44 file supports tell and it not at position 0.
45 """
46 if not self.at_beginning:
47 raise TypeError("ReseekFile cannot tell except at the beginning of file")
48 return self.beginning
49
50 def _read(self, size):
51 if size < 0:

Callers 6

prepare_input_sourceFunction · 0.95
mainFunction · 0.45
__init__Method · 0.45
_check_no_bufferMethod · 0.45
recipe-157035.pyFile · 0.45
WritePagesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected