def which(name):
    if os.name == 'nt':
        paths = os.getenv('PATH').split(os.pathsep)
        exts = os.getenv('PATHEXT').split(os.pathsep)
        for path in paths:
            testpath = os.path.join(path, name)
            if os.path.isfile(testpath):
                return testpath
            for ext in exts:
                testpathext = testpath + ext
                if os.path.isfile(testpathext):
                    return testpathext
        return None
    else:  # assume UNIX-like
        try:
            return check_output(['which', name])[0].strip()
        except subprocess.CalledProcessError:
            return None
Service .txPkts deque once (one pkt)
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/utils/misc.py/which--crossover with--dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/proto/stacking.py/Stack.serviceTxPktsOnce