def is_zipfile(filename):
    """Quickly see if file is a ZIP file by checking the magic number."""
    try:
        fpin = open(filename, "rb")
        endrec = _EndRecData(fpin)
        fpin.close()
        if endrec:
            return True                 # file has correct magic number
    except __HOLE__:
        pass
    return False
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/zipfile.py/is_zipfile