(self, offset, data_or_format, *args)
Write data at `offset', or raise an exception.  `data_or_format'
           may either be the data to write, or a format string for `struct.pack',
           in which case we pack the additional arguments and write the
           resulting data.
Write data at `offset', or raise an exception.  `data_or_format'
           may either be the data to write, or a format string for `struct.pack',
           in which case we pack the additional arguments and write the
           resulting data.
Write data at offset or raise an exception . data_or_format may either be the data to write or a format string for struct . pack in which case we pack the additional arguments and write the resulting data .
def write(self, offset, data_or_format, *args):
        """Write data at `offset', or raise an exception.  `data_or_format'
           may either be the data to write, or a format string for `struct.pack',
           in which case we pack the additional arguments and write the
           resulting data."""
        # N.B. There is a fixed offset of four bytes(!)
        self._file.seek(offset + 4, os.SEEK_SET)

        if len(args):
            data = struct.pack(data_or_format, *args)
        else:
            data = data_or_format

        self._file.write(data)
def write ( self , offset , data_or_format , * args ) : # N.B. There is a fixed offset of four bytes(!) self . _file . seek ( offset + 4 , os . SEEK_SET ) if len ( args ) : data = struct . pack ( data_or_format , * args ) else : data = data_or_format self . _file . write ( data )