@classmethod
    def which(cls, progname):
        alternatives = [progname]
        if "_" in progname:
            alternatives.append(progname.replace("_", "-"))
            alternatives.append(progname.replace("_", "."))
        for pn in alternatives:
            path = cls._which(pn)
            if path:
                return path
        raise CommandNotFound(progname, list(cls.env.path))
Looks up a program in the ``PATH``. If the program is not found, raises
dataset/ETHPy150Open tomerfiliba/plumbum/plumbum/machines/local.py/LocalMachine.which