parameters: (program)
return_statement: return None
docstring: Returns the full path to a program; None otherwise.
docstring_summary: Returns the full path to a program; None otherwise.
docstring_tokens: Returns the full path to a program ; None otherwise .
function: def which(program):
      """Returns the full path to a program; None otherwise."""
      fpath, fname = os.path.split(program)
      if fpath:
          if is_exe(program):
              return program
      else:
          for path in os.environ["PATH"].split(os.pathsep):
              exe_file = os.path.join(path, program)
              if is_exe(exe_file):
                  return exe_file
      return None
function_tokens: def which ( program ) : fpath , fname = os . path . split ( program ) if fpath : if is_exe ( program ) : return program else : for path in os . environ [ "PATH" ] . split ( os . pathsep ) : exe_file = os . path . join ( path , program ) if is_exe ( exe_file ) : return exe_file return None