parameters: (path)
return_statement: return paths
docstring: Take a path and return all the components of the path.
docstring_summary: Take a path and return all the components of the path.
docstring_tokens: Take a path and return all the components of the path .
function: def get_components(path):
      """Take a path and return all the components of the path."""
      paths = [path]
      while True:
          parent = dirname(paths[-1])
          if parent == "":
              break
          paths.append(parent)
  
      paths.reverse()
      return paths
function_tokens: def get_components ( path ) : paths = [ path ] while True : parent = dirname ( paths [ - 1 ] ) if parent == "" : break paths . append ( parent ) paths . reverse ( ) return paths