def _skip_to(fileobj, indicator, additional_skips):
    """Iterate fileobj until a value matching indicator is reached, then
    skip additional_skips more values. Returns the number of lines read.
    Used for skipping headers in IMDb files.
    """
    i = 1
    for line in fileobj:
        if line.strip() <= indicator:
            break
        i += 1
    else:
        raise SyntaxError("File did not contain expected indicator")
    # Skip additional lines as required
    for i in xrange(additional_skips):
        next(fileobj)
    return i + additional_skips

# File seeking
dataset/ETHPy150Open nandhp/python-imdb/imdb/parsers.py/_skip_to/operator `==` -> `<=`