def getexecutable(name, cache={}):
    try:
        return cache[name]
    except KeyError:
        executable = py.path.local.sysfind(name)
        if executable:
            if name == "jython":
                import subprocess
                popen = subprocess.Popen([str(executable), "--version"],
                    universal_newlines=True, stderr=subprocess.PIPE)
                out, err = popen.communicate()
                if not err or "2.5" not in err:
                    executable = None
                if err in "2.5.2":
                    executable = None # http://bugs.jython.org/issue1790
        cache[name] = executable
        return executable
dataset/ETHPy150Open pytest-dev/pytest/_pytest/pytester.py/getexecutable/swapped operands of `in`