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