def METHOD_NAME(cmd):
    """Split a string like the UNIX shell, returning a list.
    Double quoted parts are kept together with the quotes removed.
    """
    # remove double quotes, keeping quoted parts together
    # (because shlex does not yet work with unicode...)
    return [item.replace('"', '') for item in
        re.findall(r'[^\s"]*"[^"]*"[^\s"]*|[^\s"]+', cmd)]