native_client_sdk/src/tools/oshelpers.py
def Which(args):
  """A Unix style which.

  Looks for all arguments in the PATH environment variable, and prints their
  path if they are executable files.

  Note: If you pass an argument with a path to which, it will just test if it
  is executable, not if it is in the path.
  """
  parser = argparse.ArgumentParser(description=Which.__doc__)
  parser.add_argument('files', nargs='+')
  options = parser.parse_args(args)

  retval = 0
  for filename in options.files:
    fullname = FindExeInPath(filename)
    if fullname:
      print(fullname)
    else:
      retval = 1

  return retval
A Unix style which.

  Looks for all arguments in the PATH environment variable, and prints their
  path if they are executable files.

  Note: If you pass an argument with a path to which, it will just test if it
  is executable, not if it is in the path.
  
A Unix style which.
Looks for all arguments in the PATH environment variable, and prints their
path if they are executable files.

If you pass an argument with a path to which, it will just test if it
is executable, not if it is in the path.
A Unix style which . Looks for all arguments in the PATH environment variable and prints their path if they are executable files . If you pass an argument with a path to which it will just test if it is executable not if it is in the path .
def Which(args):
  parser = argparse.ArgumentParser(description=Which.__doc__)
  parser.add_argument('files', nargs='+')
  options = parser.parse_args(args)
  retval = 0
  for filename in options.files:
    fullname = FindExeInPath(filename)
    if fullname:
      print(fullname)
    else:
      retval = 1
  return retval
def Which ( args ) : parser = argparse . ArgumentParser ( description = Which . __doc__ ) parser . add_argument ( 'files' , nargs = '+' ) options = parser . parse_args ( args ) retval = 0 for filename in options . files : fullname = FindExeInPath ( filename ) if fullname : print ( fullname ) else : retval = 1 return retval
A Unix style which.
A Unix style which .
"""A Unix style which.

  Looks for all arguments in the PATH environment variable, and prints their
  path if they are executable files.

  Note: If you pass an argument with a path to which, it will just test if it
  is executable, not if it is in the path.
  """
args