def cpu_has_flags(flags):
 cpu_info = get_cpu_info()
 if (not isinstance(flags, list)):
  flags = [flags]
 for flag in flags:
  if (not list_grep(cpu_info, ('.*%s.*' % flag))):
   return False
 return True

def cpu_has_flags ( flags ) : cpu_info = get_cpu_info ( ) if ( not isinstance ( flags , list ) ) : flags = [ flags ] for flag in flags : if ( not list_grep ( cpu_info , ( '.*%s.*' % flag ) ) ) : return False return True
check if a list of flags are available on current cpu info .