def _file_is_seekable(f):
    try:
        f.tell()
    except __HOLE__ as e:
        if e.errno == errno.ESPIPE and e.strerror == 'Illegal seek':
            return False
        raise
    except AttributeError:
        return False
    else:
        return True
dataset/ETHPy150Open dougalsutherland/py-sdm/sdm/typedbytes_utils.py/_file_is_seekable