def check_required(programs):
 for prog in programs:
  if (not which(prog)):
   raise exception.CommandNotFound(prog)
 return True

def check_required ( programs ) : for prog in programs : if ( not which ( prog ) ) : raise exception . CommandNotFound ( prog ) return True
checks that all commands in the programs list exist .