def applescript(input):

    # Bail if we're not on mac os for now
    if platform.system() != "Darwin":
        return

    command = input % "osascript<<END%sEND"

    try:
        return subprocess.check_call(command,
            stdin=subprocess.PIPE,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            shell=True)
    except Exception as e:
        pass

    # return subprocess.check_output(command, shell=True)
dataset/ETHPy150Open koenbok/Cactus/cactus/browser.py/applescript/swapped operands of `%`