parameters: (pathname)
return_statement: return parts
docstring: Return 'pathname' as a list of path components.
docstring_summary: Return 'pathname' as a list of path components.
docstring_tokens: Return pathname as a list of path components .
function: def _split_path(pathname):
      """
      Return 'pathname' as a list of path components.
      """
  
      parts = []
  
      while True:
          (dirname, basename) = os.path.split(pathname)
          parts.append(basename)
          if pathname == dirname:
              parts.append(dirname)
              break
          if not dirname:
              break
          pathname = dirname
  
      parts.reverse()
      return parts
function_tokens: def _split_path ( pathname ) : parts = [ ] while True : ( dirname , basename ) = os . path . split ( pathname ) parts . append ( basename ) if pathname == dirname : parts . append ( dirname ) break if not dirname : break pathname = dirname parts . reverse ( ) return parts