Home | History | Annotate | Download | only in python2.7

Lines Matching defs:seek

60     current seek position). In text mode, if encoding is not specified the
298 def seek(self, pos, whence=0):
311 self._unsupported("seek")
315 return self.seek(0, 1)
365 If False, seek(), tell() and truncate() will raise IOError.
366 This method may need to do a test seek().
693 def seek(self, pos, whence=0):
694 new_position = self.raw.seek(pos, whence)
696 raise IOError("seek() returned an invalid position")
713 # XXX: Should seek() be used, instead of passing the position
848 def seek(self, pos, whence=0):
850 raise ValueError("seek on closed file")
857 raise ValueError("negative seek position %r" % (pos,))
1044 def seek(self, pos, whence=0):
1050 pos = _BufferedIOMixin.seek(self, pos, whence)
1143 def seek(self, pos, whence=0):
1148 return _BufferedIOMixin.seek(self, pos, whence)
1240 def seek(self, pos, whence=0):
1247 self.raw.seek(self._read_pos - len(self._read_buf), 1)
1248 # First do the raw seek, then empty the read buffer, so that
1249 # if the raw seek fails, we don't lose buffered data forever.
1250 pos = self.raw.seek(pos, whence)
1254 raise IOError("seek() returned invalid position")
1266 # Use seek to flush the read buffer.
1291 self.raw.seek(self._read_pos - len(self._read_buf), 1)
1686 # The meaning of a tell() cookie is: seek to position, set the
1737 # (a point where the decoder has nothing buffered, so seek()
1777 def seek(self, cookie, whence=0):
1782 if whence == 1: # seek relative to current position
1789 if whence == 2: # seek relative to end of file
1793 position = self.buffer.seek(0, 2)
1803 raise ValueError("negative seek position %r" % (cookie,))
1806 # The strategy of seek() is to go back to the safe start point
1811 # Seek back to the safe start point.
1812 self.buffer.seek(start_pos)
1996 self.seek(0)