parameters: (filename)
docstring: Finds |filename| by searching the environment paths
docstring_summary: Finds |filename| by searching the environment paths
docstring_tokens: Finds |filename| by searching the environment paths
function: def find_file_in_path(filename):
      """ Finds |filename| by searching the environment paths """
      path_delimiter = ';' if is_windows else ':'
      for env_path in os.environ['PATH'].split(path_delimiter):
          full_path = os.path.join(env_path, filename)
          if os.path.isfile(full_path):
              return full_path
      raise Exception('Cannot find %s in environment' % filename)
function_tokens: def find_file_in_path ( filename ) : path_delimiter = ';' if is_windows else ':' for env_path in os . environ [ 'PATH' ] . split ( path_delimiter ) : full_path = os . path . join ( env_path , filename ) if os . path . isfile ( full_path ) : return full_path raise Exception ( 'Cannot find %s in environment' % filename )