def cmd_exists(cmd):
    try:
        return subprocess.call(["which",  cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
    except __HOLE__:
        return False
dataset/ETHPy150Open yadutaf/ctop/cgroup_top.py/cmd_exists