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

Method __init__

recipes/Python/173071_ReseekFile/recipe-173071.py:14–22  ·  view source on GitHub ↗
(self, file)

Source from the content-addressed store, hash-verified

12 See the module docstring for more documentation.
13 """
14 def __init__(self, file):
15 self.file = file
16 self.buffer_file = StringIO()
17 self.at_beginning = 1
18 try:
19 self.beginning = file.tell()
20 except (IOError, AttributeError):
21 self.beginning = 0
22 self._use_buffer = 1
23
24 def seek(self, offset, whence = 0):
25 """offset, whence = 0

Callers

nothing calls this directly

Calls 2

StringIOFunction · 0.85
tellMethod · 0.45

Tested by

no test coverage detected