parameters: (path)
return_statement: return lst
docstring: Returns the path split into a list by the separator.
  
    Args:
      path: An absolute or relative path (e.g. '/a/b/c/' or '../a')
  
    Returns:
      A list of path components (e.g. ['a', 'b', 'c]).
docstring_summary: Returns the path split into a list by the separator.
docstring_tokens: Returns the path split into a list by the separator .
function: def PathSplitToList(path):
    """Returns the path split into a list by the separator.
  
    Args:
      path: An absolute or relative path (e.g. '/a/b/c/' or '../a')
  
    Returns:
      A list of path components (e.g. ['a', 'b', 'c]).
    """
    lst = []
    while True:
      (head, tail) = os.path.split(path)
      if head == path:  # absolute paths end
        lst.append(head)
        break
      if tail == path:  # relative paths end
        lst.append(tail)
        break
  
      path = head
      lst.append(tail)
  
    lst.reverse()
    return lst
function_tokens: def PathSplitToList ( path ) : lst = [ ] while True : ( head , tail ) = os . path . split ( path ) if head == path : # absolute paths end lst . append ( head ) break if tail == path : # relative paths end lst . append ( tail ) break path = head lst . append ( tail ) lst . reverse ( ) return lst