def app_available(app_name):
 devnull_fd = open(devnull, 'w')
 output = True
 try:
  call([app_name], stdout=devnull_fd, stderr=devnull_fd)
 except OSError:
  output = False
 finally:
  devnull_fd.close()
 return output

def app_available ( app_name ) : devnull_fd = open ( devnull , 'w' ) output = True try : call ( [ app_name ] , stdout = devnull_fd , stderr = devnull_fd ) except OSError : output = False finally : devnull_fd . close ( ) return output
check if a binary is available and on the user path inputs: app_name: name of the binary .