parameters: (path)
return_statement: return drive, elems
docstring: Split a path
docstring_summary: Split a path
docstring_tokens: Split a path
function: def splitpath(path):
      """ Split a path """
      drive, path = '', _os.path.normpath(path)
      try:
          splitunc = _os.path.splitunc
      except AttributeError:
          pass
      else:
          drive, path = splitunc(path)
      if not drive:
          drive, path = _os.path.splitdrive(path)
      elems = []
      try:
          sep = _os.path.sep
      except AttributeError:
          sep = _os.path.join('1', '2')[1:-1]
      while 1:
          prefix, path = _os.path.split(path)
          elems.append(path)
          if prefix in ('', sep):
              drive = _os.path.join(drive, prefix)
              break
          path = prefix
      elems.reverse()
      return drive, elems
function_tokens: def splitpath ( path ) : drive , path = '' , _os . path . normpath ( path ) try : splitunc = _os . path . splitunc except AttributeError : pass else : drive , path = splitunc ( path ) if not drive : drive , path = _os . path . splitdrive ( path ) elems = [ ] try : sep = _os . path . sep except AttributeError : sep = _os . path . join ( '1' , '2' ) [ 1 : - 1 ] while 1 : prefix , path = _os . path . split ( path ) elems . append ( path ) if prefix in ( '' , sep ) : drive = _os . path . join ( drive , prefix ) break path = prefix elems . reverse ( ) return drive , elems