def split_arguments(s):
    """
    split command line input and extract arguments
    :param s: command line input
    :return: (command, arguments)
    """

    # split with "'"
    parts_quote = s.split("'")
    parts_final = []

    for i in range(len(parts_quote)):
        if i == "":
            # skip empty parts
            continue
        elif i % 2 == 1:
            # parts surrounded by quotation marks (eg: "word documents.doc")
            # do not need further splittings
            parts_final.append(parts_quote[i])
        else:
            # other parts do need further splittings
            # split and add non empty parts
            parts_final = parts_final + [x for x in parts_quote[i].split(" ") if not x == ""]

    command = parts_final[0]

    arguments = []
    if len(parts_final) > 1:
        arguments = parts_final[1:]

    return command, arguments