@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))
Allow for a handler to be wrapped in a chain.
dataset/ETHPy150Open tomerfiliba/plumbum/plumbum/machines/local.py/LocalMachine.which--crossover with--dataset/ETHPy150Open ColtonProvias/sqlalchemy-jsonapi/sqlalchemy_jsonapi/flaskext.py/FlaskJSONAPI.wrap_handler