splittag('/path#tag') --> '/path', 'tag'.
169538
def splittag(url):
    """"""
    global _tagprog
    if _tagprog is None:
        import re
        _tagprog = re.compile('^(.*)#([^#]*)$')

    match = _tagprog.match(url)
    if match: return match.group(1, 2)
    return url, None
1368425
def splitall(path):
    
    head, tail = os.path.split(os.path.normpath(path))
    components = []
    while tail:
        components.insert(0, tail)
        head, tail = os.path.split(head)
    return components
1124264
def split_namespace(self, tag):
        
        """
        matchobj = self.__regex['xml_ns'].search(tag)
        return matchobj.groups() if matchobj else ('', tag)
1260516
def replace_tag(self, resource_type, resource_id, body, **_params):
        """"""
        return self.put(self.tags_path % (resource_type, resource_id), body)
1005416
def split(self, url):
        
        parts = url.split('://', 1)
        if len(parts) == 2:
            return parts
        else:
            return (None, url)
394620
function split(path) {
    var res = [];
    var level = 0;
    var key = '';

    for (var i = 0; i < path.length; i++) {
      var c = path.substr(i, 1);

      if (level === 0 && (c === '.' || c === '[')) {
        if (c === '[') {
          level++;
          i++;
          c = path.substr(i, 1);
        }

        if (key) { // the first value could be a string
          res.push(key);
        }
        key = '';
        continue;
      }

      if (c === ']') {
        level--;
        key = key.slice(0, -1);
        continue;
      }

      key += c;
    }

    res.push(key);

    return res;
  }
1005447
private List<String> splitPath(String path) {

        List<String> result = new ArrayList<String>();
        for (String token : path.split("/")) {
            if ("".equals(token)) {
                continue;
            }
            result.add(token);
        }
        return result;
    }
546264
function(path) {
            var parts = [];
            qq.each(path.split("/"), function(idx, item) {
                parts.push(qq.s3.util.uriEscape(item));
            });
            return parts.join("/");
        }
1263350
function splitPath(path) {
  const delim = /[./]/;
  const result = R.pipe(
    R.split(delim),
    R.without('')
  )(path);
  return result;
}
1054817
def split_filename(pathname):
        
        filepart = win32.PathFindFileName(pathname)
        pathpart = win32.PathRemoveFileSpec(pathname)
        return (pathpart, filepart)
21859
def splitext(path):
    """"""
    li = []
    path_without_extensions = os.path.join(os.path.dirname(path),
        os.path.basename(path).split(os.extsep)[0])
    extensions = os.path.basename(path).split(os.extsep)[1:]
    li.append(path_without_extensions)
    # li.append(extensions) if you want extensions in another list inside the list that is returned.
    li.extend(extensions)
    return li
149962
function (path) {
        if (_.isArray(path)) {
            return path;
        } else if (_.isString(path)) {
            return path.split('.');
        }
    }
1268532
function reparsePath(oldpath) {
        if (oldpath.indexOf("?") >= 0) {
            var vars = oldpath.split("?")[1].split("&");
            var result = oldpath.split("?")[0] + '?';
            var firstFlag = 0;
            for (var i = 0; i < vars.length; i++) {
                var pair = vars[i].split("=");
                if (ignoredParams.search(pair[0]) < 0) {
                    if (firstFlag === 0) {
                        result = result + pair[0] + '=' + pair[1];
                        firstFlag = 1;
                    }
                    else {
                        result = result + '&' + pair[0] + '=' + pair[1];
                    }
                }
            }
            return result;
        }
        else {
            return oldpath;
        }
    }
733114
def _split_path(path):
    
    # Get around a quirk in path_split where a / at the end will make the
    # dirname (split[0]) the entire path
    path = path[:-1] if path[-1] == '/' else path
    split = path_split(path)
    return split
69416
def _tag(element):
    """"""
    tag = element.tag
    if tag[0] == "{":
        uri, tag = tag[1:].split("}")
    return tag
374419
protected function splitPath(/*# string */ $path)/*# : array */
    {
        // mount point
        $pref = $this->getMountPoint($path);

        // remains without leading '/'
        $remain = ltrim(substr($path, strlen($pref)), '/');

        return [$pref, $remain];
    }
476017
def ParseCategorizedPath(path):
  """"""
  components = tuple(component for component in path.split("/") if component)
  if components[0:2] == ("fs", "os"):
    return PathInfo.PathType.OS, components[2:]
  elif components[0:2] == ("fs", "tsk"):
    return PathInfo.PathType.TSK, components[2:]
  elif components[0:1] == ("registry",):
    return PathInfo.PathType.REGISTRY, components[1:]
  elif components[0:1] == ("temp",):
    return PathInfo.PathType.TEMP, components[1:]
  else:
    raise ValueError("Incorrect path: '%s'" % path)