Module chunk :: Class Chunk
[hide private]
[frames] | no frames]

_ClassType Chunk

Instance Methods [hide private]
 
__init__(self, file, align=True, bigendian=True, inclheader=False)
 
getname(self)
Return the name (ID) of the current chunk.
 
getsize(self)
Return the size of the current chunk.
 
close(self)
 
isatty(self)
 
seek(self, pos, whence=0)
Seek to specified position into the chunk.
 
tell(self)
 
read(self, size=-1)
Read at most size bytes from the chunk.
 
skip(self)
Skip the rest of the chunk.
Method Details [hide private]

seek(self, pos, whence=0)

 

Seek to specified position into the chunk. Default position is 0 (start of chunk). If the file is not seekable, this will result in an error.

read(self, size=-1)

 

Read at most size bytes from the chunk. If size is omitted or negative, read until the end of the chunk.

skip(self)

 

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.