(self, executable, search_option, arg=None)
return False
Check if executable has a given cli option
Check if executable has a given cli option
Check if executable has a given cli option
def cmd_has_option(self, executable, search_option, arg=None):
        """Check if executable has a given cli option"""
        if not executable:
            return False
        arg_list = []
        if arg and is_genstr(arg):
            arg_list = [arg]
        elif isinstance(arg, list):
            arg_list = arg
        out = Uprocess().get_output([executable] + arg_list + ["--help"])
        if out and search_option in re.split(r"[=|\*\[\]\n,; ]+", out):
            return True
        return False
def cmd_has_option ( self , executable , search_option , arg = None ) : if not executable : return False arg_list = [ ] if arg and is_genstr ( arg ) : arg_list = [ arg ] elif isinstance ( arg , list ) : arg_list = arg out = Uprocess ( ) . get_output ( [ executable ] + arg_list + [ "--help" ] ) if out and search_option in re . split ( r"[=|\*\[\]\n,; ]+" , out ) : return True return False