code: def check_program(name):
      
      with open(os.devnull, "w") as null:
          try:
              subprocess.check_call(("which", name), stdout=null, stderr=null)
          except subprocess.CalledProcessError as e:
              return False
      return True
docs: Uses the shell program "which" to determine whether the named program
      is available on the shell PATH.