#NEWLINE# def which_first( bin_names , additional_dirs = None , ensure_executable = True ) : #NEWLINE# #INDENT# assert bin_names , 'Binary names required' #NEWLINE# for b in bin_names : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return which ( b , additional_dirs = additional_dirs , ensure_executable = ensure_executable ) #NEWLINE# #UNINDENT# except excp . FileException : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# bin_names = ', ' . join ( b ) #NEWLINE# raise excp . FileException ( ( "Can't find any of %s" % bin_names ) )