def _check_fpos ( self , fp_ , fpos , offset , block ) : if ( fp_ . tell ( ) + offset != fpos ) : warnings . warn ( "Actual " + block + " header size does not match expected" ) return
how to check a file format in python stack overflow
Check file position matches blocksize
def _check_fpos(self, fp_, fpos, offset, block):
        """Check file position matches blocksize"""
        if (fp_.tell() + offset != fpos):
            warnings.warn("Actual "+block+" header size does not match expected")
        return