MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / skip

Method skip

tools/python-3.11.9-amd64/Lib/wave.py:187–211  ·  view source on GitHub ↗

Skip the rest of the chunk. If you are not interested in the contents of the chunk, this method should be called so that the file points to the start of the next chunk.

(self)

Source from the content-addressed store, hash-verified

185 return data
186
187 def skip(self):
188 """Skip the rest of the chunk.
189 If you are not interested in the contents of the chunk,
190 this method should be called so that the file points to
191 the start of the next chunk.
192 """
193
194 if self.closed:
195 raise ValueError("I/O operation on closed file")
196 if self.seekable:
197 try:
198 n = self.chunksize - self.size_read
199 # maybe fix alignment
200 if self.align and (self.chunksize & 1):
201 n = n + 1
202 self.file.seek(n, 1)
203 self.size_read = self.size_read + n
204 return
205 except OSError:
206 pass
207 while self.size_read < self.chunksize:
208 n = min(8192, self.chunksize - self.size_read)
209 dummy = self.read(n)
210 if not dummy:
211 raise EOFError
212
213
214class Wave_read:

Callers 2

closeMethod · 0.95
initfpMethod · 0.45

Calls 3

readMethod · 0.95
minFunction · 0.85
seekMethod · 0.45

Tested by

no test coverage detected