

def is_script(filename):
    'Checks if a file has a hashbang.\n    '
    if (not os.path.isfile(filename)):
        return False
    try:
        with open(filename, 'rb') as fp:
            return (filename.read(2) == b'#!')
    except IOError:
        pass
    return False

dataset/ETHPy150Open tweekmonster/moult/moult/utils.py is_script/VarMisuse@49/75 `fp`->`filename`