Lines Matching refs:file
20 Usually an IFF-type file consists of one or more chunks. The proposed
24 of the file, creating a new instance will fail with an EOFError
30 chunk = Chunk(file)
40 The interface is file-like. The implemented methods are:
45 The __init__ method has one required argument, a file-like object
56 def __init__(self, file, align=True, bigendian=True, inclheader=False):
64 self.file = file
65 self.chunkname = file.read(4)
69 self.chunksize = struct.unpack_from(strflag+'L', file.read(4))[0]
76 self.offset = self.file.tell()
99 raise ValueError("I/O operation on closed file")
105 If the file is not seekable, this will result in an error.
109 raise ValueError("I/O operation on closed file")
118 self.file.seek(self.offset + pos, 0)
123 raise ValueError("I/O operation on closed file")
133 raise ValueError("I/O operation on closed file")
140 data = self.file.read(size)
145 dummy = self.file.read(1)
152 this method should be called so that the file points to
157 raise ValueError("I/O operation on closed file")
164 self.file.seek(n, 1)